Warning from custom panel unable to get Python class for RNA struct ''
I've coded a fair amount of scripts that use Blender's layout api, but i've never ventured into subpanels. So i may be misunderstanding the intent here.

try

class General_sett_subpanel(bpy.types.Panel):
    bl_idname = "SUB_PT_Gensett"
    bl_label = "General Settings"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_parent_id = "MAIN_PT_Mainpanel"


notice this drops the inheritance of the Mainpanel, but forces you to add bl_space_type and bl_region_type explicitly.  I'm not sure it made sense to inherit Mainpanel, the Mainpanel's poll function will determin if the subpanel is displayed anyway.

either way, this does suppress the warning.