omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    4
    10
    6480
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • donnieh
      donnieh last edited by donnieh

      Hello, I do the following and have isssues.

      1. On Mac OS desktop, I compress a bunch of .py files (about 20). Then upload to Dropbox.

      2. Using omz's Dropbox picker I import the zip file into pythonista.

      3. 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.

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • brumm
          brumm last edited by brumm

          Unzipper

          Do you use AES encryption? If not you can try Unzipper.

          1 Reply Last reply Reply Quote 0
          • donnieh
            donnieh last edited by donnieh

            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.

            1 Reply Last reply Reply Quote 0
            • omz
              omz last edited by

              @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!

              1 Reply Last reply Reply Quote 0
              • donnieh
                donnieh last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • JonB
                  JonB last edited by

                  looks like a bug.. but using stash's unzip command, i was able to unzip this perfectly.

                  donnieh 1 Reply Last reply Reply Quote 0
                  • donnieh
                    donnieh @JonB last edited by

                    @JonB @omz
                    I noticed the zip file contains a hidden mac OS folder only seen on mac. I wonder if this invokes the bug.

                    I never heard of this stash unzip command. Would you please provide an example for me so I can use it?

                    1 Reply Last reply Reply Quote 0
                    • JonB
                      JonB last edited by

                      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).

                      1 Reply Last reply Reply Quote 1
                      • omz
                        omz last edited by

                        @donnieh Thank you, I found the bug now.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        Powered by NodeBB Forums | Contributors