[PyQt] PyQt 5.5 gives TypeError: invalid result type from model.roleNames()
bgr.gyk at gmail.com
Mon Jul 13 12:26:44 BST 2015
Thanks, wasn't aware of that change.
On Fri, Jul 10, 2015 at 6:40 PM, Phil Thompson
<phil at riverbankcomputing.com> wrote:
> On 08/07/2015 5:50 pm, Nenad Ognjanovic wrote:
>> I've tried out the latest snapshots of PyQt and SIP with Qt 5.5.0, and
>> I've been getting the following error that didn't happen in previous
>> TypeError: invalid result type from my_model.roleNames()
>> I've extracted the minimal example that reproduces the problem, I've
>> attached it to this email and as a gist here:
>> Is this a bug or are we now expected to wrap the dict into some kind
>> of JSValue wrapper or similar?
> It's a bug in your code, see...
> ...you just need to use b"hello" rather than "hello".
> However I have made changes in tonight's SIP and PyQt5 snapshots so that the
> error now reads...
> TypeError: invalid result from DummyModel.roleNames(), a dict value has type
> 'str' but 'QByteArray' is expected
> ...which is hopefully more helpful.
> PyQt mailing list PyQt at riverbankcomputing.com
More information about the PyQt