Permission denied when extracting document in zip

1

I'm trying to extract some documents from a zip and I have the following error. The folder has all the permissions if I do manual the extraction works.

  

PermissionError: [Errno 13] Permission denied:   'D: \ requestsOSM \ downloadPOI'

The code I am using is the following:

filezip = r'D:\requestsOSM\descargaPOI'

fileout = r'D:\requestsOSM\descargaPOI\ExtraccionPOI'

with zipfile.ZipFile(filezip, 'r') as zip_ref:
    zip_ref.extractall(fileout)

Probe running visual code as administrator and I have the same problem.

    
asked by Sebastian 19.12.2018 в 19:15
source

1 answer

0

According to the comments:
filezip should be a zip file, while fileput, the destination path.

import zipfile

filezip = r'D:/requestsOSM/descargaPOI/prueba.zip'
fileout = r'D:/requestsOSM/descargaPOI/ExtraccionPOI/'

with zipfile.ZipFile(filezip, 'r') as zip_ref:
    zip_ref.extractall(fileout)
    
answered by 20.12.2018 / 14:05
source