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 trial

Python Using Databases in Python Our Diary App Switching It Up

Jesse Kroon
Jesse Kroon
8,275 Points

No 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
Jesse Kroon
8,275 Points

Hey 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
Cole Wilson
7,413 Points

Did you try adding the file extension?

./diary.py

Jesse Kroon
Jesse Kroon
8,275 Points

Hey 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.