Python Forum
Fixing "PermissionError: [Errno 13] Permission denied"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fixing "PermissionError: [Errno 13] Permission denied"
#7
(Feb-07-2020, 10:50 PM)jim2007 Wrote: So two things to check:

- Check if you can create a file in the folder with notepad for instance

- Your variable my_zip points to a folder name and not a file. It should be something like: my_zip = r"C:\Users\username\My_Dataset\<name>.zip"

Let us know how you go.

Thank you, I can create a file, actually I have another script, I run from PyCharm and it works on the folder, but this script gives me a permission error.

The reason my_zip points to a folder is I have a folder with zip files and I'm trying to go through them in order to extract their content into a main file. The script I have (which works) does the job but it only extract one layer of zip files, if a zip file has a subfolder in it (not necessarily a zipped folder) it won't extract those to my "main" folder. This is what I'm trying to achieve with the script that gives me an error.

Thank you for your help again.
Reply


Messages In This Thread
RE: Fixing "PermissionError: [Errno 13] Permission denied" - by puredata - Feb-08-2020, 03:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Circumvent the "access denied" page? Pedroski55 7 272 Jun-15-2024, 06:25 AM
Last Post: Pedroski55
  The INSERT permission was denied on the object Steven5055 3 1,711 Jun-12-2024, 08:13 AM
Last Post: GregoryConley
  Delete file with read-only permission, but write permission to parent folder cubei 6 22,381 Jun-01-2024, 07:22 AM
Last Post: Eleanorreo
  KivyMD android app - problem with permission polak7gt 0 382 Jan-18-2024, 01:27 PM
Last Post: polak7gt
  Potential Permission error on Mac OSX Catalina OWOLLC 1 883 Nov-02-2023, 07:52 AM
Last Post: unjnsacih
  logging: change log file permission with RotatingFileHandler erg 0 1,213 Aug-09-2023, 01:24 PM
Last Post: erg
  (python) Can i get some help fixing a English to Morse translator? Pls AlexPython 7 1,748 Sep-12-2022, 02:55 AM
Last Post: AlexPython
  access is denied error 5 for network drive mapping ? ahmedbarbary 2 1,917 Aug-17-2022, 10:09 PM
Last Post: ahmedbarbary
  Server Folder Error : WinError5 Access Denied fioranosnake 1 1,207 Jun-21-2022, 11:11 PM
Last Post: Larz60+
  Permission issue when using scapy jao 3 10,543 Feb-05-2022, 06:14 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020