Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

PySide2 tutorial not working



  • Hello,

    I am trying to follow along one of the Qt for Python tutorials at the official website. Specifically the Data Visualisation tutorial.

    Tryng to execute the code as is leads to the following error

    Traceback (most recent call last):
      File "main.py", line 8, in <module>
        from main_widget import Widget
      File "/Users/Michele/gits/data_visualisation_tutorial_Qt/main_widget.py", line 7, in <module>
        from table_model import CustomTableModel
      File "/Users/Michele/gits/data_visualisation_tutorial_Qt/table_model.py", line 5, in <module>
        class CustomTableModel(QAbstractTableModel):
    TypeError: 'Shiboken.ObjectType' object is not iterable
    

    By playing around with the code in the example it looks like python does not like to create a subclass of either QAbstractTableModel nor QWidget.

    Does anyone have any idea why this does not work?



  • @MicheleGiacomini
    Are you by any chance Python 3.8? python -V or --version



  • Yeah Python 3.8 is not yet finished, right?
    I noticed just around xmas that I couldn't even pip install PySide2 on Python 3.8 but now it's working so far but when I just from PySide2 import QtWidgets I get an ImportError: DLL load failed ...

    Is there any further information about when its coming for 3.8? Are there any build issues?




Log in to reply