[PyQt] Bug in qpycore_PyObject_AsQString

Phil Thompson phil at riverbankcomputing.com
Sat Sep 19 12:48:06 BST 2015


On 19 Sep 2015, at 9:36 am, Kovid Goyal <kovid at kovidgoyal.net> wrote:
> 
> I saw the following assert in one of my programs:
> 
> python3: ../qpy/QtCore/qpycore_qstring.cpp:165: QString qpycore_PyObject_AsQString(PyObject*): Assertion `(((PyASCIIObject*)obj)->state.ready)' failed.
> 
> This will happen if a python string that is not "ready" is passed into a
> PyQt API (such strings can be created by C python extensions, notably
> sqlite). That function should call PyUnicode_READY (and check its return
> value). 
> 
> As a workaround, one can call str() on the string before passing it to
> PyQt.

Fixed in tonight's snapshots.

Thanks,
Phil


More information about the PyQt mailing list