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 when reloading modules in the IPython Console in Python 2 #3564

Closed
ccordoba12 opened this issue Oct 20, 2016 · 0 comments
Closed

Error when reloading modules in the IPython Console in Python 2 #3564

ccordoba12 opened this issue Oct 20, 2016 · 0 comments

Comments

@ccordoba12
Copy link
Member

A user reported in our mailing list:

I got the similar issue in Spyder 3.0.0 and even Spyder 3.0.1 after run the following code

import sys  
reload(sys)

The error code in internal console are as follows

>>> Traceback (most recent call last):
  File "C:\Anaconda\lib\site-packages\qtconsole\base_frontend_mixin.py", line 163, in _dispatch
Traceback (most recent call last):
  File "C:\Anaconda\lib\site-packages\qtconsole\base_frontend_mixin.py", line 163, in _dispatch
    handler(msg)
  File "C:\Anaconda\lib\site-packages\spyder\widgets\ipythonconsole\namespacebrowser.py", line 188, in _handle_execute_reply
    self.handle_exec_method(msg)
  File "C:\Anaconda\lib\site-packages\spyder\widgets\ipythonconsole\shell.py", line 227, in handle_exec_method
    properties = ast.literal_eval(data['text/plain'])
KeyError: 'text/plain'
    handler(msg)
  File "C:\Anaconda\lib\site-packages\spyder\widgets\ipythonconsole\namespacebrowser.py", line 188, in _handle_execute_reply
    self.handle_exec_method(msg)
  File "C:\Anaconda\lib\site-packages\spyder\widgets\ipythonconsole\shell.py", line 224, in handle_exec_method
    view = ast.literal_eval(data['text/plain'])
KeyError: 'text/plain'

@dalthviz, this is an easy one. Please add a verification before line 224 of widgets/ipythonconsole/shell.py to see if the dictionary data has a 'text/plain' key. If that's not the case, please make view an empty dictionary :-)

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