# AttributeError: 'vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsROI' object has no attribute 'SetAndObserveObjectToNodeMatrix'

**URL:** <https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsroi-object-has-no-attribute-setandobserveobjecttonodematrix/27280>\
**Category:** Development\
**Created:** [January 16, 2023, 9:59pm UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsroi-object-has-no-attribute-setandobserveobjecttonodematrix/27280 "2023-01-16T21:59:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spodamon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/spodamon/32/18043_2.png) [@spodamon](https://discourse.slicer.org/u/spodamon)\
**Post date:** [January 16, 2023, 9:59pm UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsroi-object-has-no-attribute-setandobserveobjecttonodematrix/27280/1 "2023-01-16T21:59:30Z")

</div>

I was trying to create a bounding box as shown in the documentation [Script repository — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html). But I keep running into the error  
AttributeError: ‘vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsROI’ object has no attribute ‘SetAndObserveObjectToNodeMatrix’  
Using Slicer 4.11.202210226

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [January 16, 2023, 10:01pm UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsroi-object-has-no-attribute-setandobserveobjecttonodematrix/27280/2 "2023-01-16T22:01:29Z")

</div>

This is a new API. I would recommend to use the current Slicer Stable Release or Slicer Preview Release. If you are forced to use an older Slicer version then make sure you use examples from the corresponding documentation version (you can select the documentation version in ReadTheDocs in the lower-left corner).

---

<div class="post-metadata">

**Author:** ![spodamon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/spodamon/32/18043_2.png) [@spodamon](https://discourse.slicer.org/u/spodamon)\
**Post date:** [January 16, 2023, 10:12pm UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsroi-object-has-no-attribute-setandobserveobjecttonodematrix/27280/3 "2023-01-16T22:12:16Z")

</div>

Thank you for the quick response. Appreciate it. Could you link me to the page with the appropriate documentation? When I follow the link in the bottom left corner it says page not found. Thank You again.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [January 16, 2023, 10:28pm UTC](https://discourse.slicer.org/t/attributeerror-vtkslicermarkupsmodulemrmlpython-vtkmrmlmarkupsroi-object-has-no-attribute-setandobserveobjecttonodematrix/27280/4 "2023-01-16T22:28:41Z")

</div>

Slicer readthedocs only contains the Script Repository page for version 5.0 and newer. I would suggest that you upgrade from 4.11.20210226 to Slicer 5.2.1 which you can get at [https://download.slicer.org/](https://download.slicer.org/).

The last version of the Script Repository on the old Slicer wiki can be found at:

[https://www.slicer.org/w/index.php?title=Documentation/Nightly/ScriptRepository&oldid=63561](https://www.slicer.org/w/index.php?title=Documentation/Nightly/ScriptRepository&oldid=63561)
