Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyminizip.compress_multiple seems to create password for each file #30

Open
GioPetry opened this issue Dec 10, 2019 · 3 comments
Open

Comments

@GioPetry
Copy link

GioPetry commented Dec 10, 2019

Hi There,
here is my code:

for f in files:   

   to_zip.append(f) 

   to_zip_paths.append(path) 

pyminizip.compress_multiple(to_zip, to_zip_paths, 'backup_code.zip', '', 4) 

This way and with singular file compress works flawlessy, BUT if I change the last line adding a password like

pyminizip.compress_multiple(to_zip, to_zip_paths, 'backup_code.zip', '1234', 4) 

it acts really weird like it is asking the password for EACH FILE inside the folder; and it works just for the first one, if I type for the second it doesn't, look:

Schermata 2019-12-10 alle 12 56 21

Schermata 2019-12-10 alle 13 01 23

What's causing this?
Thanks

N.B. Even in the cases it works I get this warning

DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
  pyminizip.compress_multiple(...
@GioPetry
Copy link
Author

Well it seems it can only be extracted by command line, My bad

@lordkrs
Copy link

lordkrs commented Jul 27, 2020

Even I am facing the same issue

@WillianBR
Copy link

I got this today, calling the UnZip().

# My import with alias
from pyminizip import (
        compress as ZipOne,
        compress_multiple as ZipMany,
        uncompress as UnZip)

# unzipping the file (single XLSX)
logger.error("Descompactando {} ...".format(zipFilename))
UnZip(zipFilename, ZipPWD, gettempdir(), 1)
if os.path.exists(xlsxFilename):
    logger.error("Criado {} ...".format(xlsxFilename))

My SYSOUT shows:

2021-01-20 13:21:40.418 | ERROR    | __main__:despachar_email_reiterando_preaprovacao:527 - Descompactando C:\Users\Willian\AppData\Local\Temp\PreApproval.20210119.zip ...
C:/Users/Willian/Projetos/inventario-digicert/__main__.py:528: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
  UnZip(zipFilename, ZipPWD, gettempdir(), 1)
2021-01-20 13:21:40.418 | ERROR    | __main__:despachar_email_reiterando_preaprovacao:530 - Criado C:\Users\Willian\AppData\Local\Temp\PreApproval.20210119.xlsx ...

But the XLSX file is there. The UnZip works just fine! It still bother me this ugly Warning! I wanna strip it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants