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.
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.
Steven Parker221,070 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 "
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.
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