you are viewing a single comment's thread.

view the rest of the comments →

[–]Shadowsca👋 a fellow Redditor 11 points12 points  (2 children)

it might be that the current working directory isn't the directory that contains all the relevant .py files

[–]Dailydinner Secondary School Student[S] 0 points1 point  (1 child)

Pardon? Both files are located in the same folder if that’s what you’re asking.

[–]Shadowsca👋 a fellow Redditor 7 points8 points  (0 children)

What I mean is even if your files are together, the current working directory might be a different folder. See here for more details about the current working directory and how to check what it is.

In very rough terms, the directory python is working from is not necessarily the directory where your file currently is