2022-07-14

No such file or directory found, Python

I'm new to coding so I followed a tutorial for a chatbot, I need to import my intentions (which I named intentii, in my language) intentii.json into the chatbot, so I'm using:

intentii = json.loads(open('intentii.json').read())

I have seen other questions about the error I said in the title, and yes, I made sure the name is typed right, it's in the same exact directory as all my files including this chatbot one are, and still, it says it can't find the file, I tried placing the whole directory path and it seemed to work ( I didn't get the same error again, but an unicode error which I believe is another problem related to my .json file ), but I cannot use the whole path because I have to send this to my teacher and, of course, he won't have the same exact path as mine.

What is the solution?

Edit: Also, I've noticed that it says that for every file I need to access from the folder



No comments:

Post a Comment