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 trialJesse Kroon
8,275 PointsNo such file or directory! What am I doing wrong? diary.py
When I try to run the command ./diary in my python console(Workspace), I keep getting the error "bash: ./diary: No such file or directory".
I've followed every step in the video, but I can't seem to get the same results as Kenneth does. Can anyone help?
5 Answers
Jesse Kroon
8,275 PointsHey all,
I did some more research and got it working by using these two commands, in the exact order in Workspaces console:
sed '-i 's/\r//g' diary2.py
chmod +x diary2.py
Cole Wilson
7,413 PointsDid you try adding the file extension?
./diary.py
Jesse Kroon
8,275 PointsHey Cole,
Thanks for your reply. I've tried adding the python file extension, but I still get the same message, except for the 'bash:' part.
Nthulane Makgato
Courses Plus Student 19,602 PointsPost the diary.py script, there may be something there.
Nthulane Makgato
Courses Plus Student 19,602 PointsGlad its sorted :)