Error when getting the namespace view from the kernel
See original GitHub issueDescription
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Please provide any additional information below
File "/anaconda/lib/python3.6/site-packages/qtconsole/base_frontend_mixin.py", line 163, in _dispatch
handler(msg)
File "/anaconda/lib/python3.6/site-packages/spyder/widgets/ipythonconsole/namespacebrowser.py", line 214, in _handle_execute_reply
self.handle_exec_method(msg)
File "/anaconda/lib/python3.6/site-packages/spyder/widgets/ipythonconsole/shell.py", line 311, in handle_exec_method
view = ast.literal_eval(data['text/plain'])
File "/anaconda/lib/python3.6/ast.py", line 85, in literal_eval
return _convert(node_or_string)
File "/anaconda/lib/python3.6/ast.py", line 66, in _convert
in zip(node.keys, node.values))
File "/anaconda/lib/python3.6/ast.py", line 65, in <genexpr>
return dict((_convert(k), _convert(v)) for k, v
File "/anaconda/lib/python3.6/ast.py", line 66, in _convert
in zip(node.keys, node.values))
File "/anaconda/lib/python3.6/ast.py", line 65, in <genexpr>
return dict((_convert(k), _convert(v)) for k, v
File "/anaconda/lib/python3.6/ast.py", line 84, in _convert
raise ValueError('malformed node or string: ' + repr(node))
ValueError: malformed node or string: <_ast.Call object at 0x12f124400>
Version and main components
- Spyder Version: 3.2.0
- Python Version: 3.6.1
- Qt Versions: 5.6.2, PyQt5 5.6 on Darwin
Dependencies
pyflakes >=0.6.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.1 (OK)
numpy >=1.7 : 1.12.1 (OK)
sphinx >=0.6.6 : 1.5.6 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
psutil >=0.3 : 5.2.2 (OK)
nbconvert >=4.0 : 5.1.1 (OK)
sympy >=0.7.3 : 1.0 (OK)
cython >=0.21 : 0.25.2 (OK)
qtconsole >=4.2.0: 4.3.0 (OK)
IPython >=4.0 : 5.3.0 (OK)
pylint >=0.25 : 1.6.4 (OK)
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (15 by maintainers)
Top Results From Across the Web
1168776 – "Kernel doesn't support user namespace" when ...
Description of problem: Enabling user namespaces gives the error: Kernel doesn't support user namespace: Link has been severed.
Read more >Kernel' does not exist in the namespace 'Sitecore'
The issue was a result of having the Sitecore.Kernel namespace added in the namespaces portion of the web.config file in the Views directory....
Read more >Error the type or namespace name [Class] could not be found ...
There is no problem in Visual Studio 2017 but I am getting error on Visual Studio for Mac as following "Error the type...
Read more >The type or namespace could not be found. - Experts Exchange
In Vs2010 project I have an mvc repository which gives the following errors: 1) The type or namespace name 'OnePerRequestModule' could not ...
Read more >Resource management: Linux kernel Namespaces and cgroups
Added sock_net() and sock_net_set() methods (get/set network namespace of a socket) ... VXLAN, from one namespace to another, we will encounter an error:....
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, giving that this is a very critical error (because it makes the IPython console unusable), I think we should catch all errors when trying to use
ast.literal_evalinhandle_exec_method(specifically inget_namespace_viewandget_var_properties) and raise a new error that includes the values ofviewandproperties.I think something like this should work:
This way we will be able to better understand what the kernel is sending to Spyder.
However, the problem with this is we would also need the code a user is running in the console to make sense of the namespace representation we get in the error.
Let’s wait to see if more errors like this one are reported in the future before implementing this solution.
@mitchell5, I really don’t understand where this error is coming from. If you want to help us to solve it, please follow these steps:
print([data['text/plain']])before line311in/anaconda/lib/python3.6/site-packages/spyder/widgets/ipythonconsole/shell.py.View > Panes > Internal consoleand copy the text printed there after you run1+1in a console.With that info we will be able to understand why the console is not returning the result Spyder expects.