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.

Nthulane Makgato
PRO
Nthulane Makgato
Pro Student 19,601 Points

Post the diary.py script, there may be something there.