Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Pythonista Open Zip File Issue
-
Hello, I do the following and have isssues.
-
On Mac OS desktop, I compress a bunch of .py files (about 20). Then upload to Dropbox.
-
Using omz's Dropbox picker I import the zip file into pythonista.
-
The issue: only 5 files show up in pythonista, not even close to all of them.
- I can see all the py files in the zip file when viewing in Dropbox. So I know it is zipped fine. It appears pythonista is losing some files when unzipping.
I am in 2.7 mode, and yes, pythonista is latest version.
-
-
What are you using to unzip the files? I would recommend using stash. Are there any folders (in which case the files would be unzipped to multiple folders), or hidden files? Files that start with a period will not show up in pythonistas file browser, though you can see them by using stash's
ls -la
command. -
Do you use AES encryption? If not you can try Unzipper.
-
There is no special encryption. I just select and right click the files on my mac, choose compress. However, there are other files besides py files being zipped, like png and sub folders. What I am importing is a project that once was in pythonista, so there are sub folders such as "images" folder that get zipped. Is that the issue???? I moved this project to my mac to run on Xcode for testing on screen sizes, but now have to move back to pythonista.
So here is my alleged proof pythonista may not unzip correctly. Once the the zip file is in Pythonista (main library/directory), I can tap the zip file and use "Quick Look" in Pythonista to view all of the files it contains. Everything looks good. If I tap the file and choose the Extract Archive option, only a couple files get unpacked.
How else can you import mass amounts of files into pythonista? Just don't compress and import one at a time? Yikes.
-
@donnieh In case this is a bug in Pythonista's built-in unzip functionality, can you perhaps share the Zip file you're trying to import, so that I can reproduce the issue? Thanks!
-
Here is a dummy Zip that shows the same behavior. It contains 50 files and only 2 files unzip for me in Pythonista. Quick look in Pythonista confirms the 50 files.
https://www.dropbox.com/s/jc25evfr2jdzzj4/Zip example.zip?dl=0
If this is a bug, glad I could help.
-
looks like a bug.. but using stash's unzip command, i was able to unzip this perfectly.
-
-
I assume you have stash installed. Then simply run
unzip zipfilename.zip
from the stash commandline.
You could also use the
zipfile
module in the standard library (ZipFile
class,extractall
). -
@donnieh Thank you, I found the bug now.