My application was working fine until yesterday - it's nearly finished and is due tonight. Yesterday for some reason it failed to recognise any of the files within the app folder (I am using VSC). I have no idea why this suddenly occurred, but I have checked the directory of the app.py file and it is the same path as my additional files. I even tried loading my project on a different pc incase the problem was with my internal file system, but got the same error.
The error printed below is for the first file my app calls, datab.yaml, but when I remove this I get the same error with the next file I try to call (sentiment_model.pkl), and so on.
Error:
File "c:\Users\jeram\Documents\NCI\Semester3\TriagatronX50\app.py", line 57, in <module>
db = yaml.safe_load(open('datab.yaml'))
FileNotFoundError: [Errno 2] No such file or directory: 'datab.yaml'
I have tried
import os.path
prog = ("/Users/jeram/Documents/NCI/Semester3/TriagatronX50")
directory = os.path.dirname(os.path.abspath(prog))
print(os.path.join(directory, 'datab.yaml'))
But it still throws the same error when I run it.
Any help very much appreciated!!