1
$\begingroup$

I bought a plugin, it worked fine when I first activated it, but when I try to close it and open it again, I get this error Please help

Error code

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\modules\addon_utils.py", line 371, in enable
    mod.register()
  File "C:\Users\Feroa\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\Delete_Static_Channels\__init__.py", line 34, in register
    preferences.register()
  File "C:\Users\Feroa\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\Delete_Static_Channels\preferences.py", line 57, in register
    register_class(DELETESTATICCHANNELS_preferences)
ValueError: register_class(...): already registered as a subclass 'DELETESTATICCHANNELS_preferences'
$\endgroup$
7
  • $\begingroup$ Since it's a third-party addon and not built into Blender you'll have to ask the addon author about that one! $\endgroup$
    – John Eason
    Commented Aug 7, 2022 at 8:15
  • $\begingroup$ The author cannot be reached, how can I solve this? $\endgroup$
    – Fero
    Commented Aug 7, 2022 at 9:03
  • $\begingroup$ No idea I'm afraid. Are you sure that the version you have is compatible with the Blender version that you are using? Is there a web page for that addon anywhere that we can see? $\endgroup$
    – John Eason
    Commented Aug 7, 2022 at 10:00
  • $\begingroup$ yes, the plugin is compatible, it was working when I first activated it, but when I try to close and open it again, the plugin gives an error. addon gofile.io/d/L4xIPO $\endgroup$
    – Fero
    Commented Aug 7, 2022 at 10:16
  • $\begingroup$ Try here: blastframe.com/contact $\endgroup$
    – John Eason
    Commented Aug 7, 2022 at 10:45

1 Answer 1

1
$\begingroup$

That sharing site won't let me download the addon, so I can't look at the source code directly, but I think you should be able to solve this yourself with a bit of guidance.

Go to this location on your computer:

C:\Users\Feroa\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\Delete_Static_Channels\preferences.py

and open it in a code editor of some kind. Go to line 57, where it says the error is occurring.

it should say:

register_class(DELETESTATICCHANNELS_preferences)

replace that with:

try:
    register_class(DELETESTATICCHANNELS_preferences)
except ValueError:
    bpy.utils.unregister_class(DELETESTATICCHANNELS_preferences)
    register_class(DELETESTATICCHANNELS_preferences)

The error is coming from blender trying to register a class and finding that it has already been registered. This fix just says "Try to register it, if for some reason it doesn't work; move on."

This is probably not a super-legit solution but it might just make the addon work until you can get in contact with the developer (Which, like others have suggested, should be your ultimate goal.)

$\endgroup$
8
  • $\begingroup$ It let me download it without problem which is how I found the web address in the init file! Unfortunately I haven't used python for many years so didn't investigate any further. $\endgroup$
    – John Eason
    Commented Aug 7, 2022 at 14:08
  • $\begingroup$ it didn't work ;/ $\endgroup$
    – Fero
    Commented Aug 7, 2022 at 18:59
  • $\begingroup$ it didn't work ;/ hastebin.com/jipeqekebi.py (init.py) hastebin.com/ugemimaboy.sql (preferences.py) hastebin.com/okiwadekay.py (operators.py) hastebin.com/ixajuzaxih.lua (util.py) $\endgroup$
    – Fero
    Commented Aug 7, 2022 at 19:07
  • $\begingroup$ I editied my answer, see if this version works now. $\endgroup$
    – Jakemoyo
    Commented Aug 8, 2022 at 12:43
  • $\begingroup$ It didn't work. I gave the direct link of the code. I uploaded the code here from a well known site "Hastebin". Links are not bad $\endgroup$
    – Fero
    Commented Aug 9, 2022 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .