BlenderKit icon indicating copy to clipboard operation
BlenderKit copied to clipboard

[Alpha Bug] Omniverse Blender USD Branch 4.2 – ImportError: USERPREF_PT_extensions missing

Open Braum77 opened this issue 6 months ago • 3 comments

Bug Description

When I...

Launch Omniverse Blender USD Branch 4.2 (Alpha), Blender fails to start with an import error.

Environment Information - Bug happens on: Omniverse Blender USD Branch version: 4.2 (Alpha) Blender version and source: v4.2.0 (from Omniverse USD Branch installer) Operating system & architecture: Windows 11 Pro (x86_64) Using VPN, proxy, or firewall? No Error Message cannot import name 'USERPREF_PT_extensions' from 'bl_ui.space_userpref' (C:\Program Files (x86)\Omniverse\Omniverse Blender USD Branch\Release\4.2\scripts\startup\bl_ui\space_userpref.py

Braum77 avatar Oct 04 '25 03:10 Braum77

Hello @Braum77, thank you for the report. It is absurd but the import is unused. I am gonna remove it and we will see if that fixes the problem, or there is some other follow up issue. I am not able to test as I am not on Windows, but I will send you a build soon.

agajdosi avatar Oct 07 '25 12:10 agajdosi

Hey @Braum77, could you please try to download this build of add-on https://github.com/BlenderKit/BlenderKit/actions/runs/18314714995/artifacts/4204001308 which contains the fix and try it?

agajdosi avatar Oct 07 '25 13:10 agajdosi

Hello @agajdosi, I tested the build from your artifact link. Blender now starts, but a new error appears when opening the add-on panel:

Python: Traceback (most recent call last): File "C:\Users<USERNAME>\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\blenderkit\ratings.py", line 345, in poll if not utils.profile_is_validator(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users<USERNAME>\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\blenderkit\utils.py", line 1201, in profile_is_validator user_preferences = bpy.context.preferences.addons[package].preferences # type: ignore ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'bpy_prop_collection[key]: key "blenderkit" not found'

It seems the add-on is trying to access its preferences before being fully initialized. Could you please check if the poll() function in ratings.py should wait for add-on registration before calling utils.profile_is_validator()?

System info:

OS: Windows 11 Pro (x86_64) Blender: Omniverse USD Branch 4.2 (Alpha) Add-on: BlenderKit build from the artifact above

Thanks for your help!

Braum77 avatar Oct 07 '25 14:10 Braum77