Errno 13 Permission denied Python

Errno 13 Permission denied Python

For future searchers, if none of the above worked, for me, python was trying to open a folder as a file.

Check at the location where you try to open the file, if you have a folder with exactly the same name as the file you try to open (the file extension is part of the file name).

Your user dont have the right permissions to read the file, since you used open() without specifying a mode.

Since youre using Windows, you should read a little more about File and Folder Permissions.

Also, if you want to play with your file permissions, you should right-click it, choose Properties and select Security tab.

Or if you want to be a little more hardcore, you can run your script as admin.

SO Related Questions:

Errno 13 Permission denied Python

The problem here is your user doesnt have proper rights/permissions to open the file this means that youd need to grant some administrative privileges to your python ide before you run that command.

As you are a windows user you just need to right click on python ide => select option Run as Administrator and then run your command.

And if you are using the command line to run the codes, do the same open the command prompt with admin rights. Hope it helps

Leave a Reply

Your email address will not be published. Required fields are marked *