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! While you're at it, check out some resources Treehouse students have shared here.
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 trialBogdan Radu
Courses Plus Student 188 Pointshi, I get a syntax error python notifications.py
python notifications.py
^
SyntaxError: invalid syntax
python notifications.py
File "<stdin>", line 1
python notifications.py
^
SyntaxError: invalid syntax
1 Answer
Luke Maslany
3,558 PointsJust to confirm: you've created a new file in your workspace with the name 'notifications.py', typed your code and saves the file, and are then trying to execute the code from the ~/workspace folder in the console?
Unsubscribed User
8,947 PointsUnsubscribed User
8,947 PointsAre you typing "python notifications.py" from the python shell (does your console line start with >>>)? Try exiting the shell (CTRL+D or "exit()") and run it again.