Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python

Everything I type on the Workspace Console comes back as "Undefined"

I'm following the instructions step-by-step on the video and every time I get:

Type "help", "copyright", "credits" or "license" for more information.

python check_please.py
File "<stdin>", line 1
python check_please.py
^
SyntaxError: invalid syntax
clear
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'clear' is not defined

There is no inconsistency with the .py file name and what I'm typing. I've had this issue pop up before, I can't remember how to fix it and it's incredibly frustrating!

Thanks in advance

Josh Keenan
Josh Keenan
19,437 Points

Can you link to your workspace?

1 Answer

Steven Parker
Steven Parker
216,133 Points

Those are commands for the system, but you are giving them to the Python IDE (you already ran "python"). You can tell Python is running because the prompt looks like this :point_right: >>>

To get back to the system prompt, type "exit()" to Python, or just type a Ctrl-D character. The system prompt will generally look something like this :point_right: treehouse:~/workspace$