[PyQt] PyQt 5.7.1 SystemError exceptions on import

Shawn Douglas shawn.douglas at gmail.com
Mon Nov 14 03:44:59 GMT 2016


Hi,

I ran into some import issues with PyQt5 5.7.1 dev1611100918. No problems
observed with version 5.7. Using Python 3.5.2 in both cases.

The errors arise when importing a class that multiply inherits from
QMainWindow and a pyuic5-generated class from a .ui file. Here's the output:

*SystemError*: *Objects/typeobject.c:2832: bad argument to internal
function*
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cadnano/bin/main.py", line 57, in <module>
    main()
  File "cadnano/bin/main.py", line 36, in main
    app = initAppWithGui(argv, do_exec=False)
  File "./cadnano/__init__.py", line 47, in initAppWithGui
    shared_app.finishInit()
  File "./cadnano/cadnanoqt.py", line 93, in finishInit
    from cadnano.gui.controllers.documentcontroller import
DocumentController
  File "./cadnano/gui/controllers/documentcontroller.py", line 14, in
<module>
    from cadnano.gui.views.documentwindow import DocumentWindow
  File "./cadnano/gui/views/documentwindow.py", line 22, in <module>
    class DocumentWindow(QMainWindow, ui_mainwindow.Ui_MainWindow):
*SystemError*: *<class 'sip.wrappertype'> returned a result with an error
set*


For reference, the .ui and ui_.py files are here:
https://github.com/cadnano/cadnano2.5/tree/master/cadnano/gui/ui/mainwindow

pyuic5 versions 5.7 and 5.7.1dev generate identical outputs, except for the
"Created by:" line.

I found the SystemError exceptions go away if I modify my DocumentWindow
class to singly inherit from either class, but obviously that breaks the
application, so maybe there is an issue with how class args are being
handled.

Any suggestions for how to track down this issue would be appreciated.

Thanks!
Shawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161113/10f96fb9/attachment.html>


More information about the PyQt mailing list