Getting local rotation of constrained and/or driven bones

Quick question:

If I set up a driver for some property of some object, I could use the local-space rotation of a bone in an armature as a variable. How do I access that same value in Python? I have seen a number of ways, but I either haven’t been able to figure them out or they haven’t been reliable; I would hope that the solution would not be too difficult.

Maybe these?

Well, “convert_space” looks like what I want, but here’s the problem I’ve encountered:

Get Rotation.blend (936 KB)

The matrix I get when I use the object and the appropriate bone as input does not change with the bone’s rotation, no matter what spaces I convert from or to, so trying to animate an object’s location by mapping its x, y, and z-location to the local x, y, and z rotations of a rotating bone does nothing.

Any idea what’s going on?

EDIT: Found it, I think. I wasn’t defining the matrix to convert! But now attempting to do so produces a matrix that does change with time but also crashes Blender.

EDIT-IN-EDIT: And now it doesn’t crash anymore!
Get Rotation.blend (908 KB)

LAST EDIT: And now, I think it’s done. Thank you.
Get Rotation_Final.blend (876 KB)