Why is 'bpy.context.active_object.pose' of type 'NoneType'?
This is because, the object you have active in the current context, which is typically the 3D viewport , is not an armature. If it were an armature, then the type would be as stated in the documentation.