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 trialnakalkucing
12,964 PointsOops! in OOP video Multiple Superclasses. The console in the video is different than mine. Help please!
Kenneth’s console shows a different address than my console. The address in his console is: treehouse:~/workspace/rpg$ The address in my console is: treehouse:~/workspaces$ Needless to say, I can’t open play.py in my workspace. When I try, Workspaces returns the following error:
python: can’t open file ‘play.py’: [Errno 2] No such file or directory
I opened the new Workspaces when I was told to, so I am working in the pre-made new workspace. Thanks for your time and help in advance. :)
1 Answer
Ryan S
27,276 PointsHi nakalkucing,
You can navigate directories in the Workspace console the same way you'd navigate them in the console on your machine.
Use the command "cd
" to enter a directory.
In your case, the folder in question is called "rpg", so when you open up workspaces, type the following command:
treehouse:~/workspaces$ cd rpg
And you will move into that folder and have direct access to the file.
Alternatively, you can still access the file from where you are, you just need to supply the complete path of the file:
treehouse:~/workspaces$ python rpg/play.py
If you are new to the console, Treehouse has a good course called Console Foundations.
nakalkucing
12,964 Pointsnakalkucing
12,964 PointsHey, thanks for your time Ryan. I don't quite understand where I'm supposed to enter that command. Am I supposed to type it into the console?
nakalkucing
12,964 Pointsnakalkucing
12,964 PointsHa Ha! I missed that it took the first time I typed it in. : ) Silly me! Thank you so much for your help Ryan S.
Ryan S
27,276 PointsRyan S
27,276 PointsGlad you got it figured out!