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 trialCallum Anderson
Data Analysis Techdegree Student 10,200 PointsHaving trouble with opening files in shell, Python & Databases
I am running on workspaces on chrome, windows 10. I can't access my '.py' file in the shell as it believes "No such file or directory" . I have the workspace snapshotted below. Python3 file.py, ./file.py and so on are not working for me with my shebang in place either unfortunately, I just can't run it for errors and you know basically can't continue.
Snapshot ---> https://w.trhou.se/h4ghdni4n4
Many thanks
1 Answer
Megan Amendola
Treehouse TeacherWhere you located inside the folder when you tried to run the file? For example, you have a diary.py file inside of a diary folder. If you try to run python diary.py
when you are located at treehouse:~/workspace$
then you will get an error that the file doesn't exist. You need to navigate into the folder with cd diary
. Your location should then change to treehouse:~/workspace/diary$
and you can then run python diary.py
.
Callum Anderson
Data Analysis Techdegree Student 10,200 PointsCallum Anderson
Data Analysis Techdegree Student 10,200 Points-.- couldn't believe it. Thank you I totally forgot about the directories worked that way, I really appreciate it