Bone angle in python I have an armature found in my .blend file here and I want to know the angles of the joints of my armature in degrees?
I want to know how I can get the angle in degrees through python?

As shown below the bone angle is set to be 0,0,0 around x,y,z although the bone is bent, I don't know why?



Also if I rotated the selected bone 30 degrees around x by selecting the bone pressing R then X then 30, the transform menu angle around x is not 30 as shown below, I don't know why?  I've tried this bpy.data.objects['MyRig'].pose.bones['Bone2'].rotation_euler but it doesn't give the same result as shown in the transform menu.
Test code that equates the angle between the two bones.  It doesn't take into account bone roll.

import bpy
from math import degrees

from bpy import context
arm = context.object

pb1 = arm.pose.bones.get("Bone")
pb2 = arm.pose.bones.get("Bone.001")

v1 = pb1.head - pb1.tail
v2 = pb2.head - pb2.tail

if pb1 and pb2:
    print(degrees(v1.angle(v2)))
else:
    print("Invalid bone name(s)")