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 Object-Oriented Python Inheritance Multiple Superclasses

Christian Tielking
Christian Tielking
669 Points

no such file or directory

So I created play.py like in the video. When I plugged the code in and tried to run it ex: python play.py it reads back an error message saying that no such file or directory could be found. I saved the file many times, and looked back at the video to see if I missed something. Everything is the same. What should I do?

Christian Mangeng
Christian Mangeng
15,970 Points

Hi Christian,

if you run the program using "python play.py" (without specifying the path), make sure that it is in the same directory as you currently are.

Christian Tielking
Christian Tielking
669 Points

how do I open the new_rpg directory?

Christian Tielking
Christian Tielking
669 Points

the teachers workspace looks like treehouse:~workspace/rpg$ mine looks like workspace looks like treehouse:~workspace$ why are they diffrent

1 Answer

Christian Mangeng
Christian Mangeng
15,970 Points

treehouse:~workspace$ is the current directory. If yours is like that and that of the teacher is treehouse:~workspace/rpg$, it probably means that you are not in the same directory as the file you want to run. You can change the directory using:

cd rpg

(or more generally, it is cd [name of directory you want to go to], where cd means change directory)

in the workspaces console in order to switch to the rpg directory. You can also go back one directory, using

cd ..

if you need to. If you are in the correct directory, you can try "python play.py" again, but you need to check where your play.py file is located.