1

I have a zip file made in Windows 7 with winrar which opens with the password just fine in Windows- but both Ubuntu unzip from GUI and python zipfile utility running in Ubuntu cannot unzip the file with the correct password.

Interestingly, running zipfile in python on Windows also fails at extracting the files, with the same error (bad password). What could I be missing?

  • I got a similar problem few days ago with windows 10 and 7-zip. Even in .zip or .7z format, my Ubuntu PC wasn't able to extract the files if they were compressed with password protection. – migrc Mar 27 '18 at 8:09
0

Managed to find a workaround - I installed 7zip on Ubuntu using the following commands:

sudo apt-get install p7zip-full
sudo apt-get install p7zip-rar

What I do to extract the files is to import subprocess in python and use the shell to extract the files for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.