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

Typing "Import" or "From" in IPython causes errors to appear in the Internal Console #2055

Closed
spyder-bot opened this issue Feb 17, 2015 · 3 comments

Comments

@spyder-bot
Copy link
Collaborator

From aspindle...@gmail.com on 2014-11-18T07:19:22Z

Spyder Version: 2.3.1
Python Version: 3.4.2
Qt Version : 4.8.6, PyQt4 (API v2) 4.10.4 on Darwin
pyflakes >=0.6.0: 0.8.1 (OK)
pep8 >=0.6 : None (NOK)
IPython >=0.13 : 2.3.1 (OK)
pygments >=1.6 : 2.0.1 (OK)
pandas >=0.13.1 : 0.14.1 (OK)
sphinx >=0.6.6 : 1.2.3 (OK)
psutil >=0.3 : 2.1.1 (OK)
rope >=0.9.2 : 0.9.4-1 (OK)
matplotlib >=1.0: 1.4.0 (OK)
sympy >=0.7.0 : 0.7.5 (OK)
pylint >=0.25 : None (NOK)

I am having an issue where typing some commands causes a errors to pop up in the internal console. For example when I type "Import" or "From" the internal console opens and drops this error:

Traceback (most recent call last):
File "/Volumes/Data/anaconda/lib/python3.4/site-packages/IPython/qt/console/frontend_widget.py", line 60, in highlightBlock
super(FrontendHighlighter, self).highlightBlock(string)
File "/Volumes/Data/anaconda/lib/python3.4/site-packages/IPython/qt/console/pygments_highlighter.py", line 115, in highlightBlock
for token, text in self._lexer.get_tokens(string):
File "/Volumes/Data/anaconda/lib/python3.4/site-packages/pygments/lexer.py", line 192, in streamer
for i, t, v in self.get_tokens_unprocessed(text):
File "/Volumes/Data/anaconda/lib/python3.4/site-packages/IPython/qt/console/pygments_highlighter.py", line 30, in get_tokens_unprocessed
for item in action(self, m):
TypeError: 'NoneType' object is not callable

This error is continuously generated as I add characters after "Import", causing the app to jump between the Internal Console and the IPython console as I am typing, which is very frustrating. This doesn't happen with any other commands I have tried, just "Import" and "From".

What steps will reproduce the problem?

I'm afraid I don't know how one would reproduce the error, it seemed to just pop up randomly a few days ago.

What is the expected output? What do you see instead?

I am expecting to just be able to type commands without errors.

Please provide any additional information below

. I have attached two screenshots, the instant "Import" is finished typing the internal console screen appears and displays the error, the same is true for "From".

Attachment: Screen Shot 2014-11-18 at 12.17.19.png Screen Shot 2014-11-18 at 12.18.00.png

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=2055

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-11-18T14:16:29Z

I'll add a fix for this for in 2.3.2. Thanks for reporting.

Status: Duplicate
Mergedinto: 2042

@spyder-bot
Copy link
Collaborator Author

From ceccotti...@gmail.com on 2014-11-30T05:36:37Z

Hello
Facing the same problem. Everytime I insert import or from in the ipython console it jumps imediatelly to the internal console withe the error message. Any solution for this problem already?

Thanks a lot
Claudio

@spyder-bot
Copy link
Collaborator Author

From jb.pres...@gmail.com on 2014-12-01T23:50:56Z

Hello,
I have the same problem with Spyder 2.3.1 + Python 2.7.4 and the following configuration. The problem occurs after each import (and only with this command).

anaconda: 2.0.1-np18py27_0
argcomplete: 0.6.7-py27_0
astropy: 0.3.2-np18py27_0
atom: 0.3.7-py27_0
beautiful-soup: 4.3.1-py27_0
blaze: 0.5.0-np18py27_1
blz: 0.6.2-np18py27_0
bokeh: 0.4.4-np18py27_1
boto: 2.28.0-py27_0
chaco: 4.4.1-np18py27_0
colorama: 0.2.7-py27_0
configobj: 5.0.5-py27_0
cython: 0.20.1-py27_0
datashape: 0.2.0-np18py27_1
docutils: 0.11-py27_0
dynd-python: 0.6.2-np18py27_0
enable: 4.3.0-np18py27_2
enaml: 0.9.1-py27_1
future: 0.12.1-py27_0
greenlet: 0.4.2-py27_0
h5py: 2.3.0-np18py27_0
kiwisolver: 0.1.2-py27_0
llvmpy: 0.12.6-py27_0
lxml: 3.3.5-py27_0
multipledispatch: 0.4.3-py27_0
nltk: 2.0.4-np18py27_0
numba: 0.13.2-np18py27_0
patsy: 0.2.1-np18py27_0
pep8: 1.5.6-py27_0
py: 1.4.20-py27_0
pycrypto: 2.6.1-py27_1
pytest: 2.5.2-py27_0
pywin32: 218.4-py27_0
runipy: 0.1.0-py27_0
sphinx: 1.2.2-py27_0
statsmodels: 0.5.0-np18py27_1
xlsxwriter: 0.5.5-py27_0
xlwings: 0.1.0-py27_0
ipython: 2.3.1-py27_0
ipython-notebook: 2.3.1-py27_0
ipython-qtconsole: 2.3.1-py27_0
numpy: 1.9.1-py27_0
pandas: 0.15.1-np19py27_0
pygments: 2.0.1-py27_0
pytz: 2014.9-py27_0
pyzmq: 14.4.1-py27_0
requests: 2.4.3-py27_0
setuptools: 7.0-py27_0
sqlalchemy: 0.9.8-py27_0

Thanks,

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

1 participant