Error when trying to get a very large namespace view from the kernel
See original GitHub issueI keep getting the same error after running the following code:
from brian import *
brian_sample_run()
However the output seems to be fine on IPython console.
Error
File "/home/biomike/anaconda2/lib/python2.7/site-packages/qtconsole/base_frontend_mixin.py", line 163, in _dispatch
Traceback (most recent call last):
File "/home/biomike/anaconda2/lib/python2.7/site-packages/qtconsole/base_frontend_mixin.py", line 163, in _dispatch
handler(msg)
File "/home/biomike/anaconda2/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/namespacebrowser.py", line 214, in _handle_execute_reply
self.handle_exec_method(msg)
File "/home/biomike/anaconda2/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/shell.py", line 317, in handle_exec_method
properties = ast.literal_eval(data['text/plain'])
File "/home/biomike/anaconda2/lib/python2.7/ast.py", line 49, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/home/biomike/anaconda2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 9001
...}
^
SyntaxError: invalid syntax
handler(msg)
File "/home/biomike/anaconda2/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/namespacebrowser.py", line 214, in _handle_execute_reply
self.handle_exec_method(msg)
File "/home/biomike/anaconda2/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/shell.py", line 311, in handle_exec_method
view = ast.literal_eval(data['text/plain'])
File "/home/biomike/anaconda2/lib/python2.7/ast.py", line 49, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/home/biomike/anaconda2/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 4001
...}
^
SyntaxError: invalid syntax
Version and main components
- Spyder Version: 3.2.0
- Python Version: 2.7.13
- Qt Versions: 5.6.2, PyQt5 5.6 on Linux
Dependencies
pyflakes >=0.5.0 : 1.5.0 (OK)
pycodestyle >=2.3 : 2.3.1 (OK)
pygments >=2.0 : 2.2.0 (OK)
pandas >=0.13.1 : 0.20.3 (OK)
numpy >=1.7 : 1.13.1 (OK)
sphinx >=0.6.6 : 1.6.2 (OK)
rope >=0.9.4 : 0.9.4 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
psutil >=0.3 : 5.2.2 (OK)
nbconvert >=4.0 : 5.2.1 (OK)
sympy >=0.7.3 : 1.1.1 (OK)
cython >=0.21 : 0.26 (OK)
qtconsole >=4.2.0 : 4.3.0 (OK)
IPython >=4.0;<6.0: 5.3.0 (OK)
pylint >=0.25 : 1.6.4 (OK)
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Sylius Customizing Models with error class not found in ...
You have an indentation error in config.yml, it should be: sylius_addressing: resources: country: classes: model: AppBundle\Entity\Country.
Read more >namespaces(7) - Linux manual page - man7.org
Creation of new namespaces using clone(2) and unshare(2) in most cases requires the CAP_SYS_ADMIN capability, since, in the new namespace, the creator will ......
Read more >What to do when things go wrong - The Jupyter Notebook
If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command...
Read more >What possible use are those extra bits in kernel handles? Part 3
Actually, multiplexing HANDLE with HRESULT is also just another special case: We expanded the handle namespace to include error codes too.).
Read more >Digging into Linux namespaces - part 2 - Quarkslab's blog
If a user ID has no mapping inside the namespace, then system calls that return user IDs return the value defined in the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@dalthviz, please help me with this one. I think the idea is to use
reprin these places:https://github.com/spyder-ide/spyder/blob/3.x/spyder/utils/ipython/spyder_kernel.py#L113
and
https://github.com/spyder-ide/spyder/blob/3.x/spyder/utils/ipython/spyder_kernel.py#L141
Then we need to use
ast.literal_evaltwice in these places:https://github.com/spyder-ide/spyder/blob/3.x/spyder/widgets/ipythonconsole/shell.py#L330
and
https://github.com/spyder-ide/spyder/blob/3.x/spyder/widgets/ipythonconsole/shell.py#L336
I was thinking to call
reprin the kernel side, to avoid this truncation. Then we would need to callasttwice in our side.