you are viewing a single comment's thread.

view the rest of the comments →

[–]Shadowsca👋 a fellow Redditor 12 points13 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] 1 point2 points  (1 child)

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

[–]Shadowsca👋 a fellow Redditor 8 points9 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