Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Python console on startup #2386

Closed
Nodd opened this issue Apr 30, 2015 · 1 comment
Closed

Error in Python console on startup #2386

Nodd opened this issue Apr 30, 2015 · 1 comment

Comments

@Nodd
Copy link
Contributor

Nodd commented Apr 30, 2015

On startup in the default python console I see:

Traceback (most recent call last):
  File "/home/joseph/prog/spyder.git/spyderlib/widgets/externalshell/inputhooks.py", line 107, in qt4
    app = QtCore.QCoreApplication.instance()
NameError: name 'QtCore' is not defined
Got exception from inputhook, unregistering.

I guess that the problem is at the top of the file:

if os.environ["QT_API"] == 'pyqt':
    from PyQt4 import QtCore, QtGui
elif os.environ["QT_API"] == 'pyside':
    from PySide import QtCore, QtGui   # analysis:ignore

If QT_API is not defined or not these values, it doesn't load Qt. I'm using Qt5 so it's not supported.

@ccordoba12
Copy link
Member

I see, I need to declare and use pyqt5 there. Thanks for noticing it ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants