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 trialMarc Winterburn
140 PointsInvalid character in identifier
After purposefully putting in the error of a P, I get a different errror message: invalid character in identifier. With a handy little arrow (or upward pointing chevron) directly below the o in hello. This also happened when I first attempted to run the script along with video 1.
Marc Winterburn
140 PointsHaving trouble with snapshot... Hereโs a retyping: 1 print(โHello, Marcโ)
Console: treehouse:~/workspace$ python Hello.py File โHello.pyโ, line 1 print(โHello, Marcโ) ^ SyntaxError: invalid character in identifier treehouse:~/workspace$
1 Answer
KRIS NIKOLAISEN
54,971 PointsYou are seeing the error because of the use of curly quotes. Are you by chance typing this on your phone? If you change to straight quotes then the script executes as it should.
Marc Winterburn
140 PointsThank you very much Kris. I am using my tablet currently as a start but am looking to get a refurbed Mac air soon. Will look into keyboard settings. Again, many thanks
KRIS NIKOLAISEN
54,971 PointsKRIS NIKOLAISEN
54,971 PointsCan you post a snapshot of your workspace where this error could be repeated?