Add bone in the armature.
strange to say, that’s the command I took from the text plugin Rigify
in short:
scene.objects.active = obj (obj - here is my armature)
bpy.ops.object.mode_set(mode=‘EDIT’)
bone = bpy.data.edit_bones.new(‘root’)
but I get an error at startup - ‘BlendData’ object has no attribute ‘edit_bones’ - Accepts needed type ‘BlendDataArmatures’, but how to do it?