[PySide] TypeError during cythonize

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


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 <http://www.ohufx.com> 	*vfx compositing 
<http://ohufx.com/compositing.html> | *workflow customisation and 
consulting <http://ohufx.com/customising.html>* *

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20170127/0459844f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 2666 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20170127/0459844f/attachment.png>


More information about the PySide mailing list