question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when trying to get a very large namespace view from the kernel

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

0reactions
ccordoba12commented, Aug 1, 2017

I was thinking to call repr in the kernel side, to avoid this truncation. Then we would need to call ast twice in our side.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found