JacquesLucke / blender_vscode

Visual Studio Code extension for Blender development.
MIT License
557 stars 76 forks source link

Getting weird error on Save with `reloadOnSave` - but reload works! #53

Closed JPGygax68 closed 4 years ago

JPGygax68 commented 4 years ago

When I save my code, the changes are taken into account and I can use them from Blender. Yet I get the following errors in the VSCode output:

Sending: {'type': 'enableFailure', 'addonPath': 'd:\\Training\\blender\\JPsTestAddOn'}
Read blend: D:\Training\blender\waves\wave2.blend
Moved...
Got GET: {'type': 'ping'}
127.0.0.1 - - [15/Nov/2019 23:25:52] "GET / HTTP/1.1" 200 -
Got POST: {'type': 'reload', 'names': ['JPsTestAddOn']}
127.0.0.1 - - [15/Nov/2019 23:25:53] "POST / HTTP/1.1" 200 -
addon_utils.disable: JPsTestAddOn not disabled
Exception in module register(): C:\Users\gygax\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\JPsTestAddOn\__init__.py
Traceback (most recent call last):
  File "d:\Program Files\Blender Foundation\Blender\2.80\scripts\modules\addon_utils.py", line 384, in enable
    mod.register()
  File "C:\Users\gygax\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\JPsTestAddOn\__init__.py", line 32, in register
    auto_load.register()
  File "C:\Users\gygax\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\JPsTestAddOn\auto_load.py", line 30, in register
    bpy.utils.register_class(cls)
TypeError: register() missing 2 required positional arguments: 'self' and 'context'

Error: Traceback (most recent call last):
  File "d:\Program Files\Blender Foundation\Blender\2.80\scripts\modules\addon_utils.py", line 384, in enable
    mod.register()
  File "C:\Users\gygax\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\JPsTestAddOn\__init__.py", line 32, in register
    auto_load.register()
  File "C:\Users\gygax\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\JPsTestAddOn\auto_load.py", line 30, in register
    bpy.utils.register_class(cls)
TypeError: register() missing 2 required positional arguments: 'self' and 'context'

Traceback (most recent call last):
  File "c:\Users\gygax\.vscode\extensions\jacqueslucke.blender-development-0.0.12\pythonFiles\include\blender_vscode\operators\addon_update.py", line 27, in execute
    bpy.ops.preferences.addon_enable(module=self.module_name)
  File "d:\Program Files\Blender Foundation\Blender\2.80\scripts\modules\bpy\ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "d:\Program Files\Blender Foundation\Blender\2.80\scripts\modules\addon_utils.py", line 384, in enable
    mod.register()
  File "C:\Users\gygax\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\JPsTestAddOn\__init__.py", line 32, in register
    auto_load.register()
  File "C:\Users\gygax\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\JPsTestAddOn\auto_load.py", line 30, in register
    bpy.utils.register_class(cls)
TypeError: register() missing 2 required positional arguments: 'self' and 'context'
JPGygax68 commented 4 years ago

I'm not sure what happened, but please disregard this issue for now. I think it was caused by something I did wrong on my end, though the error messages seem to say otherwise. I'll be closing this issue later today unless it turns up again.