Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics Meet Python Variables

Constantly getting EOF error even though parenthesis are both closed

Opening the workspace gives me print("Hello, World" without the closing parenthesis. This seems to cause an ongoing EOF error even when I attempt to fix it, and I'm unable to do any other steps.

Steven Parker
Steven Parker
210,423 Points

Make a snapshot of your workspace and post the link to it here so we can take a look.

https://w.trhou.se/gk44sbushm

It will not capture the error mentioned in the console. Closing parenthesis and then attempting to enter python hello.py in the console generates error: SyntaxError: Unexpected EOF while parsing

2 Answers

I am able to start with your snapshot, edit it to add the closing parenthesis, save the file, and run it.

Is it possible you are forgetting to save the file after you edit it? You can hit Control-S, or use the menu at the top to save it.

Steven Parker
Steven Parker
210,423 Points

I think Adrian's right. Python can't see what you've done in the editor, you have to save your changes and then re-run Python.

If you had saved the update with the balanced parentheses, the one-sided code wouldn't still show in the snapshot.