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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Servicios Adquiridos SA de CV](https://secure.gravatar.com/avatar/5e8a585eefb641e5e82ccbffed176165?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Servicios Adquiridos SA de CV
886 PointsSyntaxError while starting the exercise :(
I started to work in the exercise and the next step was write python -i wishlist.py to get the interactive console. But when I do it, it turns out I got a SytanxError invalid syntax I typed exactly how the video says!!
4 Answers
![Swan The Human](https://uploads.teamtreehouse.com/production/profile-photos/10094022/micro_profile_pic.jpg)
Swan The Human
Full Stack JavaScript Techdegree Student 19,338 PointsTry going through the areas or lines that the syntax error is coming up and deleting the white space before the code and then re tabbing it. For some reason if you copy and paste or move your code around certain ways it’ll throw errors. This happens in challenges a lot too. Not sure why but it does.
Another option you could try is to run your code in an actual text editor such as sublime or the actual python program and see if it throws the same syntax error.
![Brandon Lombardo](https://secure.gravatar.com/avatar/4a34d34373b7632ed8412dff1278a694?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brandon Lombardo
625 PointsI am having the same problem. It is telling me that the problem is on line 4, however, there are only 3 lines. Here is my code:
books = ["Automate the Boring Stuff with Python: Practical Programming for Total Beginners - Al Sweigart", "Python for Data Analysis - Wes McKinney", "Fluent Python: Clear, Concise, and Effective Programming - Luciano Ramalho", "Python for Kids: A Playful Introduction To Programming - Jason R. Briggs", "Hello Web App: Learn How to Build a Web App - Tracy Osborn",]
print("Suggested gift: {}".format(books([0]))
![adrian miranda](https://secure.gravatar.com/avatar/fcdf6c268e35635a453e38444b69c7f8?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
adrian miranda
13,561 PointsBrandon: it is always helpful to use Markdown to format your code, otherwise it doesn't always show the code the way you intended. When you are writing your comment, just look at the "Markdown Cheatsheet" for advice.
In your program, I think the problem is that you are missing a closing parenthesis. Look at the print line closely.
The reason it is telling you the wrong line is probably that it doesn't know if you intended to continue the print call over multiple lines. It just knows that it got to the end of the file and there was no closing parenthesis to end the print command.
That is a common problem when debugging programs. If you are ever told there is an error on a particular line, and you can't find anything wrong on that line, start reading backwards. Often the problem was a line or two back, but python (or whatever programming language) didn't know for sure there was a problem until it read further.
![Brandon Lombardo](https://secure.gravatar.com/avatar/4a34d34373b7632ed8412dff1278a694?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brandon Lombardo
625 PointsOkay, great! I will use the Markdown Cheatsheet next time for sure and you're right about that parenthesis. Thank you!
adrian miranda
13,561 Pointsadrian miranda
13,561 PointsIt's hard to say what happened without seeing the code, but it does appear there is a mistake in wishlist.py. Normally python will tell you the line where the mistake is, so I would take a close look at that. Also it should show you the line. Sometimes it is guessing where the actual problem is, so be sure to check before where it reports the problem.
You may want to simply select the text in the teachers notes, and copy it into the file.