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 trial

Python

Syntax Error for the else breaking out of the try block.

Hi, in my code https://teamtreehouse.com/workspaces/41570106#

I have one syntax error listed in line 52. I think the problem came from me not doing a clean indent for the block. I didn't know how to move the block of windows, but I think I do now.

Can anyone assist?

Hi all, I did indeed solve my issue. I had an inappropriate indent ABOVE the line. Before you close the question, I am having a tough time grasping the "lack" of rules of python, compared to my previous foray into C# and its need for declarations and everything.

Can anyone recommend anything to help that transition?

Also, can you please confirm what the best way to post code in the forum is for future? Thanks!

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi Jordan,

Looks like you may have solved the issue as the workspace no longer exists. Is that the case? If so I'll mark the thread as solved! :-)

Should he be linking to a snapshot instead?