"Error: Corrupted zip or bug: expected 6409 records in central dir, got 0" with small zip
hugovk opened this issue · 8 comments
Using a recent Twitter archive zip (for the recently deleted @PythonPillow), "Your archive.html" says:
Date generated·February 27, 2024 at 6:39:12 PM GMT+2·Estimated size·11 MB
The zip is actually 19 MB which is still small. It has 190 tweets.
I got this:
Error! Error: Corrupted zip or bug: expected 6409 records in central dir, got 0
I am guessing that your archive is too big! If it's more than 2GB you're likely to see this error. If you look above at the "Known problems" section, you'll see a potential solution. Sorry it is a bit of a pain in the ass.
I fixed it by unzipping it and re-zipping it (on macOS with right-click the contents and "Compress"), and it worked with that file.
PS thank you for this tool! The archive is now hosted at https://python-pillow.org/twitter-archive/
@hugovk, do you still have the original archive? Can you provide a test case?
@aclark4life, same question to you, so we can maybe fix this for other people.
re python-pillow/Pillow#7828 (comment)
I couldn't get https://tinysubversions.com/twitter-archive/make-your-own/ to work but if anyone else wants to try please let me know and I'll send you the zip. Pretty sure I've published the contents of the zip on the web in the past without worrying about privacy issues
@mrcolbyrussell I have the original and can get new archives from Twitter for my personal account but hesitant to share due to privacy issues. However if you have PRs or branches with potential fixes I can test for you. Hope that helps.
@aclark4life I understand the reluctance about privacy issues for your personal account. I'm fine just using with the PythonPillow archive.
if you have PRs or branches with potential fixes I can test for you
I don't have anything. I have no way to even use this; I don't have a ZIP to feed into it.
@mrcolbyrussell I have a ZIP file that's experiencing this issue and which I can provide for testing.
@gamebits whence?
@mrcolbyrussell Is there a way I can submit it to you other than posting it publicly here?
@gamebit how big is the archive? You can email it to me if it's small enough. My contact info is in my profile and my homepage. https://colbyrussell.com/
If it's too big for email and you want to upload to a filesharing service like Google Drive, you could do that and email me the link—just make sure you set the right permissions. You could of course also fork/create a private GitHub project (maybe github.com/gamebits/twitter-archive) and add me as a collaborator. Flip over to the releases tab from the repo overview and upload the ZIP as a binary. (For good measure, you could also unzip the archive into a Git repo and push it to the same project, too. Regardless of whether you do this, you'll still want the actual ZIP that's causing problems to be uploaded, though, since we're interested in the file as provided by Twitter, and it won't do me any good to clone a copy that's already been unzipped—having the repo would just be if you felt like using Git/GitHub to manage your backups was a good idea.)