You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello spyder-kernels team.
Thanks for your work!
I stumbled across the following
Problem:
On my system:
Fedora 33,
Python 3.9
Spyder 4.1.5
PyQt5 5.15.0,
I cannot instantiate QApplication in Spyder. As a test case, run the following code
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
def window():
app = QApplication(sys.argv)
w = QWidget()
b = QLabel(w)
b.setText("Hello World!")
w.setGeometry(100,100,200,50)
b.move(50,20)
w.setWindowTitle("PyQt5")
w.show()
sys.exit(app.exec_())
if __name__ == '__main__':
window()
On execution in the IPython Shell I get the following error:
File "/usr/lib/python3.9/site-packages/spyder_kernels/customize/spydercustomize.py", line 160, in __init__
super(SpyderQApplication, self).__init__(*args, **kwargs)
TypeError: super(type, obj): obj must be an instance or subtype of type
The same code runs on a terminal using the standard python interpreter without problems.
Solution:
The error can be fixed by changing line 160 of spydercustomize.py from super(SpyderQApplication, self).init(*args, **kwargs)
to super().init(*args, **kwargs).
The text was updated successfully, but these errors were encountered:
Hello spyder-kernels team.
Thanks for your work!
I stumbled across the following
Problem:
On my system:
Fedora 33,
Python 3.9
Spyder 4.1.5
PyQt5 5.15.0,
I cannot instantiate
QApplication
in Spyder. As a test case, run the following codeOn execution in the IPython Shell I get the following error:
The same code runs on a terminal using the standard python interpreter without problems.
Solution:
The error can be fixed by changing line 160 of
spydercustomize.py
fromsuper(SpyderQApplication, self).init(*args, **kwargs)
to
super().init(*args, **kwargs)
.The text was updated successfully, but these errors were encountered: