TypeError: MESH_OT_add_triangle.is_property_set("location") not found
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