FileNotFoundError: [Errno 2]

Hello, 

I am new to Pycharm and I haven't fully understood its full potential. I keep getting this error:

FileNotFoundError: [Errno 2] No such file or directory: '___.txt'

I don't understand why Pycharm doesn't read the file in txt which is located in the same folder of the script i am trying to execute. 

Thanks for your help

0

Hello, 

 

Please try to mark the folder where the .txt file locates as  "source root", right -click on the folder and "Mark the directory as". 

Also, please check the working directory in the Run/Debug Configuration https://www.jetbrains.com/help/pycharm/creating-and-editing-run-debug-configurations.html 

0

请先登录再写评论。