Pycharm access denied and file unavailable error

When I open a file in pycharm it shows error.
1.When I try to run a folder(which is a mistake) it shows permission denied even after running pycharm as administrator and granting full permissions for folder.
2.When I try to open file in folder( which is correct) it shows no such file or directory even when file exists.
My code is:- open("C:\\users\\username\\folder\\file")
Even after adding 'r' parameter same error pops up!
Please help

1 comment

Please try to run the code outside of IDE to isolate the issue.

Also, please copy the absolute path to the file from the editor, and try to open it from the terminal with:

type "C:\\Home\\test\\projects\\venv-basic\\temp\\file.txt"

0

Please sign in to leave a comment.