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 trialSwan The Human
Full Stack JavaScript Techdegree Student 19,338 PointsGetting error code play.py python: can't open file 'play.py': [Errno 2] No such file or directory
ive tried writing and rewriting the code myself multiple times and i finally broke down and just downloaded the zip and uploaded everything exactly as written and i get this error no matter what
1 Answer
drew mullen
1,555 PointsI think you have to change to the directory first.
Try
cd rpg
python play.py
OR
python ./rpg/play.py
Paul Melos
3,905 PointsPaul Melos
3,905 PointsIf you want to run it in the python shell you will have to change your directory to wherever you unzipped the zip files. You can change directories in the shell by importing the os module.