-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ValueError: malformed node or string: <_ast.Call object at 0x000000001A5BA588> #7444
Comments
Thanks @dalthviz! Closing because this was solved a long time ago. |
@ccordoba12 Hello, May I know how did you solve this problem? I am facing the same error now but cannot manage to solve it. Thanks. |
You need to update Spyder. It was a problem in our side. |
@ccordoba12 Hi, unfortunately, I still have this problem, even though I updated Spyder to 3.3.2. |
@MiriamKl, please open a new issue and give us a simple and reproducible code that generates this problem. |
@mkkuemmel @ccordoba12 @Sherochen You may want to try to use "eval()" instead of "literal_eval()". |
Description
What steps will reproduce the problem?
After I run this code snippet, it pops the error window:
try:
kwls = record['PubmedArticle'][0]['MedlineCitation']['KeywordList'][0]
for w in kwls:
abs_str.append(w)
except:
abs_str.append('')
Then I cannot run any code unless I restart Spyder
What is the expected output? What do you see instead?
Please provide any additional information below
File "C:\Users\Xiaojun\Anaconda3\lib\site-packages\qtconsole\base_frontend_mixin.py", line 163, in _dispatch
handler(msg)
File "C:\Users\Xiaojun\Anaconda3\lib\site-packages\spyder\widgets\ipythonconsole\namespacebrowser.py", line 220, in _handle_execute_reply
self.handle_exec_method(msg)
File "C:\Users\Xiaojun\Anaconda3\lib\site-packages\spyder\widgets\ipythonconsole\shell.py", line 354, in handle_exec_method
view = ast.literal_eval(literal)
File "C:\Users\Xiaojun\Anaconda3\lib\ast.py", line 85, in literal_eval
return _convert(node_or_string)
File "C:\Users\Xiaojun\Anaconda3\lib\ast.py", line 66, in _convert
in zip(node.keys, node.values))
File "C:\Users\Xiaojun\Anaconda3\lib\ast.py", line 65, in
return dict((_convert(k), _convert(v)) for k, v
File "C:\Users\Xiaojun\Anaconda3\lib\ast.py", line 66, in _convert
in zip(node.keys, node.values))
File "C:\Users\Xiaojun\Anaconda3\lib\ast.py", line 65, in
return dict((_convert(k), _convert(v)) for k, v
File "C:\Users\Xiaojun\Anaconda3\lib\ast.py", line 84, in _convert
raise ValueError('malformed node or string: ' + repr(node))
ValueError: malformed node or string: <_ast.Call object at 0x000000001A5BA588>
The text was updated successfully, but these errors were encountered: