Poly-Haven / polyhavenassets

A Blender add-on to integrate our assets natively in the asset browser
GNU General Public License v3.0
312 stars 21 forks source link

Python Fetch Assets error #82

Closed spookyblock closed 1 year ago

spookyblock commented 1 year ago

Fetch assets is not working

Python: Traceback (most recent call last):
  File "C:\Users\x\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\polyhavenassets-main\operators\pull_from_polyhaven.py", line 294, in execute
    error, assets = get_asset_list(self.asset_type)
  File "C:\Users\x\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\polyhavenassets-main\utils\get_asset_list.py", line 15, in get_asset_list
    verify_ssl = not bpy.context.preferences.addons["polyhavenassets"].preferences.disable_ssl_verify
KeyError: 'bpy_prop_collection[key]: key "polyhavenassets" not found'

Python: Traceback (most recent call last): File "C:\Users\x\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\polyhavenassets\operators\pull_from_polyhaven.py", line 303, in execute copy_file(default_catalog_file, catalog_file) File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\python\lib\shutil.py", line 417, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\python\lib\shutil.py", line 256, in copyfile with open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: 'C:\Program Files\Poly Haven\polyhavenassets\blender_assets.cats.txt'

Followed all instructions tried to change file location and reinstall but nothing works.

gregzaal commented 1 year ago

Hi, if you're not purchasing the add-on from the Blender Market or supporting us on Patreon, make sure you follow the installation instructions in the readme carefully. The add-on must be downloaded from the releases page. This is the cause of your first error message.

The second error message is self explanatory, Blender does not have permission to read the file C:\Program Files\Poly Haven\polyhavenassets\blender_assets.cats.txt. Typically Program Files is not meant to store data and has restricted permissions. You should choose a different folder for your asset library.

spookyblock commented 1 year ago

Nevermind I was able to make it work by running as administrator on Windows 11 if anyone else encounters issues with trying to fetch assets