apple / ml-hypersim

Hypersim: A Photorealistic Synthetic Dataset for Holistic Indoor Scene Understanding
Other
1.67k stars 129 forks source link

zipfile.BadZipFile: Truncated file header #52

Closed Hiusam closed 1 year ago

Hiusam commented 1 year ago

Hi, I ran

python contrib/99991/download.py -c .tonemap.jpg -d /home/datasets/hypersim --silent

and it raise:

Traceback (most recent call last):
  File "contrib/99991/download.py", line 620, in <module>
    main()
  File "contrib/99991/download.py", line 616, in main
    download_files(args)
  File "contrib/99991/download.py", line 577, in download_files
    z.extract(entry.filename, args.directory)
  File "/home/###/anaconda3/envs/###/lib/python3.7/zipfile.py", line 1619, in extract
    return self._extract_member(member, path, pwd)
  File "/home/###/anaconda3/envs/###/lib/python3.7/zipfile.py", line 1689, in _extract_member
    with self.open(member, pwd=pwd) as source, \
  File "/home/###/anaconda3/envs/###/lib/python3.7/zipfile.py", line 1521, in open
    raise BadZipFile("Truncated file header")
zipfile.BadZipFile: Truncated file header

I encountered this error after finishing downloading hypersim/ai_011_009/images/scene_cam_00_final_preview/frame.0066.tonemap.jpg

And advice? Thank you.

mikeroberts3000 commented 1 year ago

I just ran this:

python download.py --contains ai_011_009/images/scene_cam_00_final_preview/frame.0066.tonemap.jpg --scene ai_011_009

And it worked for me. I didn't get the same error as you. Were you able to download other files successfully?

Hiusam commented 1 year ago

Hi, I ran the command for several times and found the error raised when downloading different files.

mikeroberts3000 commented 1 year ago
Hiusam commented 1 year ago

Simply after running the script several times, I make it download all the files. Thank you for your patience.