FileNotFoundError in PyCharm

Hi, Ive hit a problem in PyCharm that I can’t figure out. I’m following Mikes Python 4 hr tutorial and I’m trying to read a file.
I’m running this in a file called CustomerInput which I s what I write all my code in and run it, and then save the code into a more specfic filename, as you can see in the screenshot.
PyCharm is telling me it can’t find the file and I can see it, hopefully you can too. I’m very new to Python and new to coding in a console and running it instantaneously, so please be easy on me. I’ve tried putting single ’ around the file name, Ive tried moving the r and having single ’ around it. Sometimes it gets past the filename and doesnt recognise the “r”.

Hopefully you can see the screenshot.

Can someone advise me what I should do please?

thanks in advance
terry

Hi all,

I’ve figured out what I was doing wrong. In the video Mike said that he was in an app.py file and at the time I didn’t realise this was important.

It is important.

I set up a new root level structure and created an app.py file in there, and the file I was looking for, and the appy.file could find the file I was looking for.

If you are reading this then thank you for looking

terry

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.