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

import module fails in ipython console; works when running a file #2073

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

import module fails in ipython console; works when running a file #2073

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

Comments

@spyder-bot
Copy link
Collaborator

From and...@flappingbird.com on 2014-12-03T14:40:23Z

Spyder Version: 2.3.1
Python Version: 2.7.8
Qt Version : 4.8.6, PyQt4 (API v2) 4.10.4 on Windows
pyflakes >=0.5.0: 0.8.1 (OK)
pep8 >=0.6 : 1.5.7 (OK)
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)
rope >=0.9.2 : 0.9.4 (OK)
matplotlib >=1.0: 1.4.2 (OK)
sympy >=0.7.0 : 0.7.5 (OK)
pylint >=0.25 : None (OK)

What steps will reproduce the problem?

Open up an ipython console; try to type 'import' (without quotes) and as soon as you add a space to put the name of the library, you get an error.

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

Traceback (most recent call last):
File "C:\Anaconda\lib\site-packages\IPython\qt\console\frontend_widget.py", line 60, in highlightBlock
super(FrontendHighlighter, self).highlightBlock(string)
File "C:\Anaconda\lib\site-packages\IPython\qt\console\pygments_highlighter.py", line 115, in highlightBlock
for token, text in self._lexer.get_tokens(string):
File "C:\Anaconda\lib\site-packages\pygments\lexer.py", line 192, in streamer
for i, t, v in self.get_tokens_unprocessed(text):
File "C:\Anaconda\lib\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
Traceback (most recent call last):
File "C:\Anaconda\lib\site-packages\IPython\qt\console\frontend_widget.py", line 60, in highlightBlock
super(FrontendHighlighter, self).highlightBlock(string)
File "C:\Anaconda\lib\site-packages\IPython\qt\console\pygments_highlighter.py", line 115, in highlightBlock
for token, text in self._lexer.get_tokens(string):
File "C:\Anaconda\lib\site-packages\pygments\lexer.py", line 192, in streamer
for i, t, v in self.get_tokens_unprocessed(text):
File "C:\Anaconda\lib\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
Traceback (most recent call last):
File "C:\Anaconda\lib\site-packages\IPython\qt\console\frontend_widget.py", line 60, in highlightBlock
super(FrontendHighlighter, self).highlightBlock(string)
File "C:\Anaconda\lib\site-packages\IPython\qt\console\pygments_highlighter.py", line 115, in highlightBlock
for token, text in self._lexer.get_tokens(string):
File "C:\Anaconda\lib\site-packages\pygments\lexer.py", line 192, in streamer
for i, t, v in self.get_tokens_unprocessed(text):
File "C:\Anaconda\lib\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

Please provide any additional information below

. When you run a script, this works.

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

@spyder-bot
Copy link
Collaborator Author

From and...@flappingbird.com on 2014-12-03T11:42:18Z

Note that this fails in Spyder, but not when running ipython from a Windows 7 console.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-12-04T13:07:16Z

Please update to 2.3.2. This was already fixed :-)

Status: Duplicate
Mergedinto: 2042

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