TypeError: MESH_OT_add_triangle.is_property_set("location") not found I get this error when I add a mesh object to my scene, but I don't know what it means:
Error: Python: Traceback (most recent call last):
  File &quot;C:\triangle-test\ui-triangle.py&quot;, line 36, in execute
    object_data_add(context, steeve.mesh, operator=self)
  File &quot;C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\modules\bpy_extras\object_utils.py&quot;, line 130, in object_data_add
    obj_new.matrix_world = add_object_align_init(context, operator)
  File &quot;C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\modules\bpy_extras\object_utils.py&quot;, line 60, in add_object_align_init
    if operator and properties.is_property_set(&quot;location&quot;):
TypeError: MESH_OT_add_triangle.is_property_set(&quot;location&quot;) not found

The object is effectively added to the scene but usually I notice that Blender crashes after a few seconds.
Note: I have an operator named T2T_TRIANGLE_add_triangle but no MESH_OT_add_triangle, I suppose it's generated internally.
What am I doing wrong?
EDIT
Code of the operator:
class T2T_TRIANGLE_add_triangle(bpy.types.Operator):
    &quot;&quot;&quot;Create a new triangle object&quot;&quot;&quot;
    bl_idname = &quot;mesh.add_triangle&quot;
    bl_label = &quot;Add Triangle&quot;
    bl_options = {'REGISTER', 'UNDO'}

    lvl = bpy.props.IntProperty(name=&quot;Level:&quot;, default=2, set=set_level)
    ang = bpy.props.FloatProperty(name=&quot;Angle:&quot;, default=60, set=set_angle)

    level = 2
    angle = 60

    def execute(self, context):
        steeve = Triangle(level=self.level, angle=self.angle)
        object_data_add(context, steeve.mesh, operator=self)
        steeve.mesh.validate(verbose=True)
        return {'FINISHED'}

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

def set_level(self, value):
    self[&quot;level&quot;] = value


def set_angle(self, value):
    self[&quot;angle&quot;] = value
The operator requires a location, rotation, align property.
If you are going to use object_data_add to add an object to the scene then make sure you use mixin class AddObjectHelper  As demonstrated in the addon add object template
from bpy_extras.object_utils import AddObjectHelper, object_data_add

class OBJECT_OT_add_object(Operator, AddObjectHelper):
    &quot;&quot;&quot;Create a new Mesh Object&quot;&quot;&quot;
    bl_idname = &quot;mesh.add_object&quot;
    bl_label = &quot;Add Mesh Object&quot;
    bl_options = {'REGISTER', 'UNDO'}

    scale: FloatVectorProperty(
        name=&quot;scale&quot;,
        default=(1.0, 1.0, 1.0),
        subtype='TRANSLATION',
        description=&quot;scaling&quot;,
    )

    def execute(self, context):

        add_object(self, context)

        return {'FINISHED'

or annotate your class with the usual suspects location, rotation, align  See https://blender.stackexchange.com/a/160995/15543