OBB script error

Hello,

I’ve been trying to get the oriented bounding boxes (OBBs) for my segmentations, and have been trying to use the script found on this page (Script repository — 3D Slicer documentation) under “Markups ROI” of “Get size, position, and orientation of each segment.”

It always works smoothly until the very last line of code, where I get an attribution error as seen in the picture below.
Screen Shot 2022-01-15 at 1.59.55 PM

Why is this happening and how can I fix it?
Thank you in advance for your help.

Michele