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
When using a console, either just Python or IPython consoles, it's not possible to set PyQt's APIs to v2 (important when using Python 2.7-) because sip complains PyQt's API was already set.
What steps will reproduce the problem?
Open a console
Paste this code:
import sip
sip.setapi("QString", 2)
What is the expected output? What do you see instead?
I expected the API to be set smoothly, without problems. Since each console is a new process, this shouldn't be a problem. However, one can only set the API before importing anything from PyQt, otherwise a ValueError is raised:
Traceback (most recent call last):
File "<ipython-input-1-d148d852a0a4>", line 2, in <module>
sip.setapi("QString", 2)
ValueError: API 'QString' has already been set to version 1
Please provide any additional information below
First I noticed that sip.getapi("QString") would return 1 in a console. However, if running it in the Internal console, I get a 2.
I've also had some binary-search "fun" with git and tracked the regression to Steven Silvester's branch, on commit c701aa6 - Fix circular import
The previous commit: cba88eb - Fix required version adding
did not pose the same problem.
The branch was merged in commit b60139e - Merge pull request #2932 from blink1073/async-introspection - PR: Asynchronous introspection for the Editor
Versions and main components
Spyder Version: 3.0.0dev
Python Version: Python 2.7.11 |Anaconda 2.5.0 (64-bit)| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)] on win32
Operating system: Windows 8.1 64-bit
Dependencies
Please go to the menu entry Help > Optional Dependencies (or Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0: 1.5.1 (OK)
nbconvert >=4.0 : 4.1.0 (OK)
numpy >=1.7 : 1.10.4 (OK)
pandas >=0.13.1 : 0.17.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.5.0: 1.0.0 (OK)
pygments >=1.6 : 2.1 (OK)
pylint >=0.25 : 1.5.4 (OK)
qtconsole >=4.0 : 4.1.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.3.5 (OK)
sympy >=0.7.3 : 0.7.7.dev (OK)
The text was updated successfully, but these errors were encountered:
ccordoba12
changed the title
(I)Python console is loading PyQt without being asked for
(I)Python consoles are not setting PyQt API to #2
Mar 23, 2016
When using a console, either just Python or IPython consoles, it's not possible to set PyQt's APIs to v2 (important when using Python 2.7-) because sip complains PyQt's API was already set.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I expected the API to be set smoothly, without problems. Since each console is a new process, this shouldn't be a problem. However, one can only set the API before importing anything from PyQt, otherwise a ValueError is raised:
Please provide any additional information below
First I noticed that
sip.getapi("QString")
would return 1 in a console. However, if running it in the Internal console, I get a 2.I've also had some binary-search "fun" with git and tracked the regression to Steven Silvester's branch, on commit
c701aa6 - Fix circular import
The previous commit:
cba88eb - Fix required version adding
did not pose the same problem.
The branch was merged in commit
b60139e - Merge pull request #2932 from blink1073/async-introspection - PR: Asynchronous introspection for the Editor
Versions and main components
Dependencies
Please go to the menu entry
Help > Optional Dependencies
(orHelp > Dependencies
), press the buttonCopy to clipboard
and paste the contents below:
jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0: 1.5.1 (OK)
nbconvert >=4.0 : 4.1.0 (OK)
numpy >=1.7 : 1.10.4 (OK)
pandas >=0.13.1 : 0.17.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.5.0: 1.0.0 (OK)
pygments >=1.6 : 2.1 (OK)
pylint >=0.25 : 1.5.4 (OK)
qtconsole >=4.0 : 4.1.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.3.5 (OK)
sympy >=0.7.3 : 0.7.7.dev (OK)
The text was updated successfully, but these errors were encountered: