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

brandon supinski
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
brandon supinski
Python Development Techdegree Graduate 27,983 Points

Getting error when trying to run play.py, I redid the video three times now still getting it.

When trying to run play.py I get error: python: can't open file 'play.py': [Errno 2] No such file or directory. Also have checked to make sure it is in the RPG folder

I am using python play.py I checked that the file was named play.py even copied file name to run it.

2 Answers

Steven Parker
Steven Parker
231,271 Points

Is the RPG folder your current working folder? You might need to "cd RPG" first. Or, you might invoke it from the root folder using "python RPG/play.py".

If neither of these work, try making a snapshot of your workspace and post the link to it here. That will enable us to replicate your issue.

Thank you, I thought I was losing my mind. Can't believe I forgot to change the directory.

I had the same problem and this is what I typed. python rpg/play.py and it worked if. If you will notice in the video his work space had the rpg/: already added to it but mine didn't. just something to watch for in future videos. Silas