(Video Included) Addon Wont Activate after Installation I'm trying to enable an addon from a basic python template I saved, but it wont let me check the box to activate it. Here's what the problem looks like:
https://www.youtube.com/watch?v=tGFOwwfikAA&amp;feature=youtu.be

Is there any reason it's not letting me do this? 
Thank you very much for your time!

import bpy


def main(context):
    for ob in context.scene.objects:
        print(ob)


class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        main(context)
        return {'FINISHED'}

bpy.ops.transform.translate(value=(0, 2.20362, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=True, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)


def register():
    bpy.utils.register_class(SimpleOperator)


def unregister():
    bpy.utils.unregister_class(SimpleOperator)


if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator()
You have put your operational code in as part of the Class SimpleOperator.

This means that when the register creates the Class your code is run, which is the wrong time and has no context.

Take the bpy.ops.transform.translate code and move it out of the Class definition and move it into the main function e.g.

def main(context):
    for ob in context.scene.objects:
        print(ob)
    bpy.ops.transform.translate(value=(0, 2.20362, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, True, False), mirror=True, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)


Now when you run the test call

bpy.ops.object.simple_operator()


It will print out all the Object names and then try and Translate the currently selected Object