HELP: Registering panel class: 'FaceUV', bl_idname 'FACE_PT_uv' has been registered before

I have this issue when testing out my blender python code, where I run my code and when I try to run my code again it comes reports that my id name has been registered before and won’t let me run my new code

Here’s my code

Yeah you have to restart Blender each time

No need to restart Blender if everything is done properly…

For example, to check if the class is already registered before you call register_class.

def register():
    if FaceUV.is_registered:
        bpy.utils.unregister_class(FaceUV)

    bpy.utils.register_class(FaceUV)

It doesn’t seem to work and still out puts the same error

I’ve just noticed this: the problem is not about registering and unregistering the class.

If you look closely to the output, Blender responds that it will remove the class before registering it again.

The problem is about bl_context = "scene". That’s not a valid context for the VIEW_3D. (drawing it will be ignored)

You should probably leave it at bl_context = "mesh_edit", if you want it only to be visible while in EDIT_MODE.

Thank you so much, helped solve the issue i had