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
Handle deflate64-compressed ZIP files in the "Start S3 transfer" Lambda #4614
Handle deflate64-compressed ZIP files in the "Start S3 transfer" Lambda #4614
Comments
Bumping the environment to python3.8 gets a different error:
|
Cracking the zipfile open in an EC2 instance running Python 3.7 works fine, so I guess we're missing something like zlib in the Lambda? |
Ah, so I can see the namelist but not actually extract files. It does give me a slightly more useful error:
|
Some thorough discussion of compression methods over here explains that deflate64 is a proprietary compression method not supported by Python: thejoshwolfe/yauzl#58 I'm going to look at including p7zip in the Lambda container. |
So Trudy is using 7-Zip to create the ZIP files, and that uses the deflate64-compression algorithm. You can unpack these files with p7zip on the command line ( We only need to unpack the ZIP in the Lambda to do validation; for accessions at least we can infer the accession number from the filename. I'm going to try that. |
Trudy has reported a fascinating bug – she’s uploaded a ZIP that’s ~5.6GB in size. The Lambda should be triggered and start a transfer in Archivematica, or produce a log if not. It’s not producing a log.
Looking in CloudWatch, I see the following error:
A bit of googling suggests this is a bug in the Python standard library: https://bugs.python.org/issue22102
I’m hoping that updating the Lambda runtime to Python 3.8 will fix this for us. I can’t find a published changelog, but a mention appears in the Python 3.8.0b1 changelog which matches the changelog in the patch:
The text was updated successfully, but these errors were encountered: