I am trying to download a zip file from the cloud storage in the following manner:
import shutil
with tempfile.NamedTemporaryFile(suffix=".zip") as source_zip:
aws_util.download(my_buicket, "my_folder/design.zip", source_zip)
shutil.unpack_archive(source_zip.name, "myfile", "zip")
While trying to unpack the temporary zip file created in the step above. I am getting the following error:
shutil.ReadError: C:\Users\ryan.zhu\AppData\Local\Temp\tmppnn80v56.zip is not a zip file
I am using windows OS.
How to solve it. Thanks