-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Spyder fails to launch with PySide on Windows #975
Comments
From techtonik@gmail.com on 2012-03-23T00:54:42Z The https://code.google.com/p/spyderlib/source/browse/spyderlib/requirements.py#49 check_qt() should be modified to check spyderlib.qt.version - this will introduce dependency from spyderlib.qt, but we can fix that by version and binding flavor type explicitly from spyder.py We also need to expose qt._modname with as a public API - something like qt.binding |
From techtonik@gmail.com on 2012-03-23T00:54:56Z Status: Accepted |
From techtonik@gmail.com on 2012-03-23T02:32:03Z WIP patch that should fix the issue, but leaves many questionable TODOs Attachment: fix.qt.requirements.check.diff |
From jed.lud...@gmail.com on 2012-03-23T08:14:01Z Of course, the simple fix was to simply revert revision ffbfa56f4872 :). But I agree that the better approach is to improve Spyder's Qt proxy. Factoring in IPython's need for API
Ideally, all of this would be accomplished through importing only version information from the various packages. No actually imports of QtCore, QtGui, etc., should happen until after all the above options have been finalized at run time. |
From pierre.raybaut on 2012-03-25T14:29:01Z This issue was updated by revision 9c4649090f0a . Status: Fixed |
From jed.lud...@gmail.com on 2012-03-22T11:29:36Z
What steps will reproduce the problem?
I tried this on more than one machine, and the behavior was the same on both. What is the expected output? What do you see instead? Spyder fails to launch. Traceback is:
c:\src\spyderlib>bootstrap.py --gui pyside -- debug
Executing Spyder from source checkout Revision 1945 :46defadf01ae, Branch: default
Traceback (most recent call last):
File "C:\src\spyderlib\bootstrap.py", line 76, in
from spyderlib import spyder
File "C:\src\spyderlib\spyderlib\spyder.py", line 75, in
from spyderlib.qt.QtGui import (QApplication, QMainWindow, QSplashScreen,
File "C:\src\spyderlib\spyderlib\qt\QtGui.py", line 13, in
from PySide.QtGui import *
ImportError: DLL load failed: The specified procedure could not be found. Please use labels and text to provide additional information. I bisected the repository and found that revision ffbfa56f4872 is the source of the issue. I'll create a code review highlighting the offending line.
The problem shows up in spyder.py. First, line 31 requests an import of Spyder's qt module:
from spyderlib import qt
This is supposed to trigger Spyder's internal logic to import the right flavor of Qt. In previous revisions, this was accomplished by importing all of PySide right from the Spyder's qt module. Now the qt module doesn't really import much from PySide. It just sees if it can get a version number. Then at line 36:
requirements.check_qt()
The requirements checking process actually imports PyQt4.QtCore. The real root of the problem then comes at line 75 where QtGui is imported. What happens is that during the import of PySide.QtGui python finds that it already has a copy of QtCore imported, and it tries to use PyQt4.QtCore with PySide.QtGui, and everything falls apart from there. I verified this using Procmon.exe to watch the system search for modules and DLLs.
As a quick test, if I comment out the requirements check at line 36 of spyder.py, Spyder with PySide launches as expected. The import of PySide.QtGui triggers an import of PySide.QtCore as it should.
Windows 7
Python 2.7.2
Qt 4.7.4
PySide 1.1.0
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=975
The text was updated successfully, but these errors were encountered: