Hello together,
I want to have HDRI Backgrounds in my Dataset. I found out about the haven Dataset where HDR Images were used as backgrounds.
I followed the instructions and tried to download the Haven Dataset via python scripts/download_haven.py
After executing the program I got an error saying:
Traceback (most recent call last):
File "scripts/download_haven.py", line 76, in <module>
download_items("https://texturehaven.com/textures/", output_dir / "textures", download_texture)
File "scripts/download_haven.py", line 45, in download_items
item_download_func(item_id, item_output)
File "scripts/download_haven.py", line 51, in download_texture
with zipfile.ZipFile(BytesIO(request.content)) as tar:
File "/Users/user/opt/anaconda3/lib/python3.8/zipfile.py", line 1269, in __init__
self._RealGetContents()
File "/Users/user/opt/anaconda3/lib/python3.8/zipfile.py", line 1336, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
Somehow it managed to download all files as .jpg but when executing my program with the loader.HavenEnvironmentLoader module I get the following Error:
Exception: The folder: resources/haven/hdris does not contain a folder name hdfris. Please use the download script.
Thank you for any help! :)
Hey,
just to be sure that you offered the right path you need to provide the path to a folder in which a folder exists with the name hdris, which has the following structure:
hdris/
โโโ abandoned_church
โย ย โโโ abandoned_church_2k.hdr
โโโ abandoned_factory_canteen_01
โย ย โโโ abandoned_factory_canteen_01_2k.hdr
โโโ abandoned_factory_canteen_02
โย ย โโโ abandoned_factory_canteen_02_2k.hdr
โโโ abandoned_games_room_01
โย ย โโโ abandoned_games_room_01_2k.hdr
โโโ abandoned_games_room_02
โย ย โโโ abandoned_games_room_02_2k.hdr
โโโ abandoned_hall_01
Is that the case?
Best,
Max
When executing the python scripts/download_haven.py it only downloaded a folder saying "textures" with all the .jpg Images inside.
I sadly have no .hdr files at all...
I just restarted the download process, it first downloads the textures and afterwards the hdris.
Can you remove the resources/haven folder and try again?
Make sure that your BlenderProc github repo is on the newest version and that you haven't changed the download_script.
Yeah I tried deleting it and download it again but I always get an error saying File is not a zip file, I also have the latest version of BlenderProc and I also didn't changed the download_script...
But I found a workaround. I can just download any kind of HDR file and put it in the structure you provided above.
That is just a litte more effort but you can now use any HDR file you want to :)
Thank you for the Help!
Kind regards,
Tobi
It seems that your system doesn't download the zip file. This is hard to debug from here, you can print the following url:
And try to download it by hand. Are you behind a proxy, which might be blocked by texturehaven?
Best,
Max
Then I will do it by hand thank you!
I don't think I am but to be honest I don't really know. Maybe Apple is blocking something there (I am working on Mac) and just doesn't allow zip files to be unzipped or anything...
If anyone else has the same problem, we will have to investigate this further, but at the moment I will call this issue closed.
Yeah me too! Thank you for your Help :)