JacquesLucke / blender_vscode

Visual Studio Code extension for Blender development.
MIT License
545 stars 74 forks source link

Crash in Blender 2.93 #104

Open LorenzWieseke opened 3 years ago

LorenzWieseke commented 3 years ago

On a fresh install, it seems to work but as soon as I work a little with Blender 2.93, your extension gives me an error and I can't Build and Run the Add-on. Blender 2.92 works like a charm.

Traceback (most recent call last): File "c:\Users\wiese.vscode\extensions\jacqueslucke.blender-development-0.0.16\pythonFiles\launch.py", line 14, in blender_vscode.startup( File "c:\Users\wiese.vscode\extensions\jacqueslucke.blender-development-0.0.16\pythonFiles\include\blender_vscode__init.py", line 17, in startup
communication.setup(editor_address, path_mappings) File "c:\Users\wiese.vscode\extensions\jacqueslucke.blender-development-0.0.16\pythonFiles\include\blender_vscode\communication.py", line 21, in setup DEBUGPY_PORT = start_debug_server() File "c:\Users\wiese.vscode\extensions\jacqueslucke.blender-development-0.0.16\pythonFiles\include\blender_vscode\communication.py", line 53, in start_debug_server debugpy.listen(("localhost", port)) File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\debugpy__init.py", line 111, in listen from debugpy.server import api File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\debugpy\server__init.py", line 9, in import debugpy._vendored.force_pydevd # noqa File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\debugpy_vendored\force_pydevd.py", line 45, in preimport('pydevd', [ File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\debugpy_vendored__init.py", line 128, in preimport import_module(name) File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\debugpy_vendored\pydevd\pydevd_plugins__init.py", line 5, in import('pkg_resources').declare_namespace(name__) File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\pkg_resources\init__.py", line 3257, in def _initialize_master_working_set(): File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\pkg_resources\init__.py", line 3240, in _call_aside f(*args, **kwargs) File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\pkg_resources\init.py", line 3269, in _initialize_master_working_set working_set = WorkingSet._build_master() File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\pkg_resources\init__.py", line 573, in _build_master ws = cls() File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\pkg_resources\init.py", line 566, in init self.add_entry(entry) File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\python\lib\site-packages\pkg_resources\init.py", line 620, in add_entry self.entry_keys.setdefault(entry, []) TypeError: unhashable type: 'list' Saved session recovery to 'C:\Users\wiese\AppData\Local\Temp\quit.blend' Exception in module unregister(): 'C:\Users\wiese\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\GLBTextureTools\init__.py' Traceback (most recent call last): File "c:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\addon_utils.py", line 438, in disable mod.unregister() File "C:\Users\wiese\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\GLBTextureTools\init__.py", line 43, in unregister auto_load.unregister() File "C:\Users\wiese\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\GLBTextureTools\auto_load.py", line 41, in unregister bpy.utils.unregister_class(cls) RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered)

LorenzWieseke commented 3 years ago

So to prevent blender from crashing I deleted all addons, then separately adding each add-on, and figured out It crashed once I added Xatlas.

Still the auto_loader gives me an error once I run two separate addons, both using the auto loader. But at least blender is back and running.

HugoMcPhee commented 1 year ago

I got the same issue with xatlas enabled, to fix, I edited the xatlas __init__.py file, to convert __path__ to a non-list

# make sure path's not a list here
edited_path = __path__
if type(edited_path) == list:
    edited_path = edited_path[0]

sys.path.append(edited_path)