[Interest] TypeError during cythonize

Frank Rueter | OHUfx frank at ohufx.com
Thu Jan 26 20:33:50 CET 2017


true, will do, thanks.

On 26/01/17 11:03 PM, Alexandru Croitor wrote:
> Hi,
>
> In case you are using PyQt, I would suggest you will get higher 
> response rates at the PyQt mailing list,
> because this particular curiosity does not seem related to the 
> internal Qt code.
>
>> On 25 Jan 2017, at 21:38, Frank Rueter | OHUfx <frank at ohufx.com 
>> <mailto:frank at ohufx.com>> wrote:
>>
>> Hi all,
>>
>> I have run into this issue a couple of times now:
>>
>> Some of my class declarations look like this:
>>
>>     class DBTaskQueue(QtCore.QObject):
>>         def __init__(self, npdbInstance, task=None, parent=None):
>>             super(DBTaskQueue, self).__init__(parent)
>>
>>
>> This works fine when run as pure python code but when I cythonize I 
>> get this error:
>>
>>     TypeError:super(type,obj):obj must be an instance orsubtype of type
>>
>>
>> The error only happens when I provide arguments to t super() - e.g. 
>> "parent" in this case.
>> The workaround is to use this instead:
>>
>>     class DBTaskQueue(QtCore.QObject):
>>         def __init__(self, npdbInstance, task=None, parent=None):
>>     *QtCore.QObject.__init__(self, parent)*
>>
>>
>> When there is no  argument to super() it always seems to be happy.
>>
>> Is this a bug or user error?
>>
>> Cheers,
>> frank
>>
>>
>> -- 
>> <ohufxLogo_50x50.png> <http://www.ohufx.com/> 	*vfx compositing 
>> <http://ohufx.com/compositing.html> | *workflow customisation and 
>> consulting <http://ohufx.com/customising.html>* *
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org <mailto:Interest at qt-project.org>
>> http://lists.qt-project.org/mailman/listinfo/interest
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170127/63b9d4a9/attachment.html>


More information about the Interest mailing list