-
Notifications
You must be signed in to change notification settings - Fork 334
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
Invalid Syntax error on multi-line values #904
Comments
I encounter the same issue with multi-line sections that I try to execute in one shot with Hydrogen. |
I have figured out that when declaring a variable and assigning a value to it, you have to run the code from the top line (seems inconvenient, when I'm wanting to run the code upon completion of typing the values, but I get it). However, I have not figured out a workflow to make if/elif/else statements run within Hydrogen. |
I select all the text I want to run and hit cmd-enter ( |
Description:
When creating multi-line values, such as a dictionary, I am receiving an 'invalid syntax' error when trying to run Hydrogen within Atom. However, if I run the dictionary as a long single line, Hydrogen runs fine.
I have tested the multi-line code within my Jupyter notebook, and have run the .py file through Terminal with the multi-line code saved and both run just fine. Hydrogen is the only thing that I try to run that is having the issue.
Steps to Reproduce:
Versions:
Which OS and which version of Hydrogen and Atom are you running?
Mac OS - 10.12.5
Atom - 1.18.0
Hydrogen - 1.18.0
Atom : 1.18.0
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0
You can get this information from copy and pasting the output of
atom --version
from the command line.Logs:
Please post any error logs and the output of the developer tools as described in our Debugging Guide.
File "", line 1
'population': [200.4, 143.5, 1252, 1357, 52.98]}
^
SyntaxError: invalid syntax
When using this dictionary:
worldDict = {'country': ['Brazil', 'Russia', 'India', 'China', 'South Africa'],
'capital': ['Brasilia', 'Moscow', 'New Delhi', 'Beijing', 'Pretoria'],
'area': [8.516, 17.10, 3.286, 9.597, 1.221],
'population': [200.4, 143.5, 1252, 1357, 52.98]}
The text was updated successfully, but these errors were encountered: