Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
markspenser
Courses Plus Student 256 PointsPython workspace didn't work to run a file.
I was going to run a saved file with: python notes.py
But terminal said: SyntaxError: invalid syntax
Please help
6 Answers

Michael Joyce
6,214 PointsYou might be in a python shell while trying to execute this. Try exit() then attempt python notes.py again (assuming you are using OSX).

markspenser
Courses Plus Student 256 PointsI'm using Mozilla Firefox, Windows7 32 bit

Michael Joyce
6,214 PointsSorry I thought you were performing this locally on your machine. I think you can still try exit() in workspaces.

markspenser
Courses Plus Student 256 PointsI did. No help

markspenser
Courses Plus Student 256 PointsI have to use python IDLE still. Any ideas for solution please ?

Kenneth Love
Treehouse Guest TeacherWhen it says SyntaxError
, does it give a line number or snippet of code that holds the syntax error? If so, can you share it with us?

markspenser
Courses Plus Student 256 PointsThere is no code snippet. Just that what I wrote

Kenneth Love
Treehouse Guest TeacherSo that makes me think you did python notes.py
while you were still in a Python shell. Try running exit()
first (you should see the >>>
disappear) and then run your script.