CGCookie / blender-addon-updater

A module for enabling users to check for add-on updates and install new versions directly from Blender.
GNU General Public License v3.0
247 stars 42 forks source link

Name error #77

Closed Lynchon83 closed 3 years ago

Lynchon83 commented 3 years ago

Hi,

I'm trying to register the addon_updater_ops in my addon but I get this error when enabling it in blender:

Exception in module register(): C:\Users\Juan Manuel Lynch\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\lynchon_tools\__init__.py
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_2.93.104.0_x64__ppwjx1n5r4v9t\Blender\2.93\scripts\modules\addon_utils.py", line 386, in enable
    mod.register()
  File "C:\Users\Juan Manuel Lynch\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\lynchon_tools\__init__.py", line 1676, in register
    addon_updater_ops_register(bl_info)
NameError: name 'addon_updater_ops_register' is not defined

I can't undestand why, as the only two lines of codes added are the ones shown in the tutorial and which yo can check in the images attched. and the folder structure:

image image image

any ideas?

TheDuckCow commented 3 years ago

Hi there, based on what is written, I believe you will need to write something like addon_updater_ops.register instead of addon_updater_ops_register (quoted from your above message, note the missing period). Let me know if that resolves your issue. This is required because the module containing the data being imported is named addon_updater_ops, while the function you are calling from that module is register.

TheDuckCow commented 3 years ago

Following up here, let me know if the above resolves your issue!

Lynchon83 commented 3 years ago

Can`t believe I was so blind... I would swear that I copied the register function using the clipboard from the tutorial webpage...

Thank you

TheDuckCow commented 3 years ago

Happens to the best of us! Glad it's sorted out now, cheers