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 trialJaïr Veder
6,545 PointsError when running doctest locally
I've tried running the doctest local, but keep on getting a SyntaxError
>>> python -m doctest -v dd_game.py
SyntaxError: invalid syntax
>>>
Anybody knows what's causing this?
[MOD: added ```python formatting -cf]
2 Answers
Chris Freeman
Treehouse Moderator 68,457 PointsYou appear to be in the Python REPL. Instead, run doctest from the command or shell prompt.
Post back if you need more help. Good luck!!
Jaïr Veder
6,545 PointsMy apologies, must have misread it! After some difficulties, I was able to use it local. Thanks :)
Jaïr Veder
6,545 PointsJaïr Veder
6,545 PointsThanks for your answer, but I am running it from the Python 3.6.2. shell so that does not seem to be the reason. Any other thoughts?
Chris Freeman
Treehouse Moderator 68,457 PointsChris Freeman
Treehouse Moderator 68,457 PointsIt needs to be run outside the Python shell. It should be run in a Windows command window or a Linux bash shell or other OS terminal window prompt.
Quit out of the REPL shell before running the command.