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 Advanced Objects Controlling Conversion

cannot run program in shell

My workspace shell is giving me an error whenever i try to run the program. "python: can't open file 'play.py': [Errno 2] No such file or directory" is the error I'm getting when i type in 'python play.py' in the shell. I do not know why its only affecting the OOP- MasterClass's Folder as all my other workspaces for other topics are working well.

2 Answers

Solved the issue by opening a new workspace and copy,pasting the code

Philip Schultz
Philip Schultz
11,437 Points

Are you sure that the console was in the rpg folder when you tried to run play.py? In the video he is pretty much assuming the users know how to navigate the console, which can be very frustrating for beginners. Did you catch him in the video using the 'cd' command to navigate in and out of directories? I'm not sure if this is the problem, but in case it is there is a pretty good course here at treehouse called 'Console Foundations' that goes over how to use the console pretty well.

Thanks Phillip because that actually was the problem. I realized how to use the cd command in other videos so now I know how to use it.

I can't answer that, but I have asked other students.