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

For some reason I'm getting a syntax error in the get_saved_data method. What am I missing?

After running python app.py, I get the following error

treehouse:~/workspace$ python app.py
File "app.py", line 10
except TypeError:
^
SyntaxError: invalid syntax

I've copied the contents of my app.py file in this public gist below, any thoughts on what I'm missing?

https://gist.github.com/terribledevice/0af1d5f7c67a7edcb76baae9394d4b16

3 Answers

hi john,I have just started learning python,I dont know whether my ans is wrong or right,I think there a Indentation Error on line 11, I,E return statment..

I double checked all the spaces, doesn't seem to resolve it. Thanks, though!

It was a missing closed parenthesis around (request.cookies.get('character'))

:smh:

haha

lol.a minor error tip:-write the parenthesis first and then the code,this will help you not getting into such errors.