Page MenuHome

raise Exception("register_module(%r): defines no classes" % module) on module names with dot *NEED MORE INFO*
Closed, ArchivedPublic

Description

Hi,

I'm trying to call 'bpy.utils.register_module(__name__) ' and i get an exception:
raise Exception("register_module(%r): defines no classes" % module)

__name__ has a dot in it e.g. "Hallo.World".
The file is lying in addons/Hallo/World.py.
There is also addons/Hallo/__init__.py

register_module(__name__) in addons/Hallo/__init__.py doesn't go through all python files an registers all classes. That why I called register_module() in World.py, too. But I seem that it doen't find classes.

Best Regards
Martin

Event Timeline

Please include the module in a zip/tar archive.

Hi,

i found out, I don't need register_module(__name__) in all files. Inside __init__.py it's enough. I just have to import the needed python files into __init__.py and all classes are registered. Sorry.

This ticket can be closed.

Campbell Barton (campbellbarton) changed the task status from Unknown Status to Archived.Sep 3 2011, 11:08 AM
Kévin Dietrich (kevindietrich) changed the status of subtask T42067: BLENDER from Unknown Status to Archived.Oct 4 2014, 1:39 AM