# Model Registration Module Error

**URL:** <https://discourse.slicer.org/t/model-registration-module-error/18191>\
**Category:** Support\
**Created:** [June 17, 2021, 6:33pm UTC](https://discourse.slicer.org/t/model-registration-module-error/18191 "2021-06-17T18:33:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sfglio](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sfglio/32/3346_2.png) [@sfglio](https://discourse.slicer.org/u/sfglio)\
**Post date:** [June 17, 2021, 6:33pm UTC](https://discourse.slicer.org/t/model-registration-module-error/18191/1 "2021-06-17T18:33:58Z")

</div>

How can I fix the following error message?

Traceback (most recent call last):  
File “/Applications/Slicer.app/Contents/Extensions-29959/SlicerIGT/lib/Slicer-4.13/qt-scripted-modules/ModelRegistration.py”, line 167, in onApplyButton  
logic.run(inputSourceModel, inputTargetModel, outputSourceToTargetTransform, self.typeSelector.currentIndex, self.iterationSpin.value )  
File “/Applications/Slicer.app/Contents/Extensions-29959/SlicerIGT/lib/Slicer-4.13/qt-scripted-modules/ModelRegistration.py”, line 185, in run  
self.delayDisplay(‘Running iterative closest point registration’)  
AttributeError: ‘ModelRegistrationLogic’ object has no attribute ‘delayDisplay’

I am using the latest nighty version of slicer…

Kind regards

---

<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:** [June 17, 2021, 9:24pm UTC](https://discourse.slicer.org/t/model-registration-module-error/18191/2 "2021-06-17T21:24:26Z")

</div>

`delayDisplay` in the ScriptedModuleLogic class had been deprecated due to `delayDisplay` being for testing purposes and had been in the ScriptedModuleTest class in addition to being available from anywhere using `slicer.util.delayDisplay`. The deprecation of `delayDisplay` in the Logic class was enforced as it was removed in favor of only having the other locations. This was [ENH: Move testing methods in scripted logic class to test class · Slicer/Slicer@71f236b · GitHub](https://github.com/Slicer/Slicer/commit/71f236bfacffec1d6c01036840dfc8d89be0563c).

Therefore the ModelRegistration module needs to be updated here:

> <https://github.com/SlicerIGT/SlicerIGT/blob/5cb6a0eda5a38cf4f4d04c475e9cbca7227ad200/ModelRegistration/ModelRegistration.py#L185>

---

<div class="post-metadata">

**Author:** ![sfglio](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sfglio/32/3346_2.png) [@sfglio](https://discourse.slicer.org/u/sfglio)\
**Post date:** [June 18, 2021, 6:58pm UTC](https://discourse.slicer.org/t/model-registration-module-error/18191/3 "2021-06-18T18:58:49Z")

</div>

Thank you for your reply. But what exactly needs to be updated in L185 asking as a python newbie? Is that something I can fix?

In my script it looks exactly as indicated above.

---

<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:** [June 18, 2021, 7:18pm UTC](https://discourse.slicer.org/t/model-registration-module-error/18191/4 "2021-06-18T19:18:07Z")

</div>

You could change it to

```python
slicer.util.delayDisplay('Running iterative closest point registration')

```

If you’re able to contribute this change by submitting a PR to [GitHub - SlicerIGT/SlicerIGT: Modules supporting image-guided interventions in 3D Slicer.](https://github.com/SlicerIGT/SlicerIGT) that would be helpful! Then other people that download the extension won’t experience the same issue you have found.

---

<div class="post-metadata">

**Author:** ![sfglio](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sfglio/32/3346_2.png) [@sfglio](https://discourse.slicer.org/u/sfglio)\
**Post date:** [June 18, 2021, 8:43pm UTC](https://discourse.slicer.org/t/model-registration-module-error/18191/5 "2021-06-18T20:43:46Z")

</div>

Yes this works. I tried to open a PR in [GitHub - SlicerIGT/SlicerIGT: Modules supporting image-guided interventions in 3D Slicer.](https://github.com/SlicerIGT/SlicerIGT)  
[/quote] however I only managed to open an issue there…sorry
