What is wrong with this class? Why is it failing to register?

Below is one of about 6 or so classes in my script.

When I run it, the registration

bpy.utils.register_class(FramedWall)

errors and I just can’t figure out why. I must be blind or something.

class FramedWall(bpy.types.Operator):    
    bl_idname = "lumber.Wall"
    bl_label = "Framed Wall"
    
    def execute(self, context):
        bpy.ops.mesh.primitive_cube_add(); 
        return {'FINISHED'}
    

I’m pretty new to python, but semi colons aren’t necessary , could be that, line 6 add(); . That or something way over my head right now.

first of all look at your bl idname
upper case letter which is a no no!

for regist do it like this

def register():
bpy.utils.register_module(name)

bpy.types.INFO_MT_mesh_add.append(menu_func)

bpy.utils.register_class(OkOperator)

bpy.utils.register_class(MessageOperator)

def unregister():
bpy.utils.unregister_module(name)

bpy.types.INFO_MT_mesh_add.append(menu_func)

bpy.utils.unregister_class(OkOperator)

bpy.utils.unregister_class(MessageOperator)

if name == “main”:
register()

but if you have no menu then use this

def register():
bpy.utils.register_module(name)

def unregister():
bpy.utils.unregister_module(name)

if name == “main”:
register()

happy bl

but if you have no menu then use this

? It has nothing to do with menus. You either register class for class, or let it register all classes in the module.

Ah man… it was the upper case letters. Thanks for pointing that out.

just redid a new test and sorry
but if you don’t register the menu it does not work!
and no error but new item is not added to the add menu list !

happy bl