python unable to load files in same directory causing a lot of problems Running on MacOS 10.15.7, and using pycharm All my programs were running fine yesterday and now it can not seem to find these files.
with open('lorem.txt',mode='r') as file:
for line in file:
print(line)
this is returning this traceback
Traceback (most recent call last):
File "/Users/calblanco/PycharmProjects/pundont/main.py", line 2, in <module>
with open('lorem.txt','r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'lorem.txt'
Both the python file and txt file are in the exact same directory. This is also happening in a few other programs I have that rely on reading files