# Error when creating path in Endoscopy module

**URL:** <https://discourse.slicer.org/t/error-when-creating-path-in-endoscopy-module/23303>\
**Category:** Development\
**Created:** [May 6, 2022, 12:04pm UTC](https://discourse.slicer.org/t/error-when-creating-path-in-endoscopy-module/23303 "2022-05-06T12:04:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [May 6, 2022, 12:04pm UTC](https://discourse.slicer.org/t/error-when-creating-path-in-endoscopy-module/23303/1 "2022-05-06T12:04:55Z")

</div>

This is with Slicer preview 5.1.0-2022-05-04 on Windows 10. This is very likely pilot error as I have not used the Endoscopy module in (literally) years.

I’ve created a point list of input fiducials, selected a new model for Output Path, but when I click “Create Path”, nothing happens and I get the following error in the console/error log. Any help would be much appreciated!

```auto
Traceback (most recent call last):
  File "C:/Users/hherhold/AppData/Local/NA-MIC/Slicer 5.1.0-2022-05-04/bin/../lib/Slicer-5.1/qt-scripted-modules/Endoscopy.py", line 239, in onCreatePathButtonClicked
    model = EndoscopyPathModel(result.path, fiducialsNode, outputPathNode)
  File "C:/Users/hherhold/AppData/Local/NA-MIC/Slicer 5.1.0-2022-05-04/bin/../lib/Slicer-5.1/qt-scripted-modules/Endoscopy.py", line 537, in __init__
    pointsArray = vtk.util.numpy_support(points.GetData())
TypeError: 'module' object is not callable

```

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [May 6, 2022, 3:01pm UTC](https://discourse.slicer.org/t/error-when-creating-path-in-endoscopy-module/23303/2 "2022-05-06T15:01:20Z")

</div>

I can confirm that, tested in 5.1.0-2022-05-05 (throws that error) and in a 2021 version of 4.13 (no error).

---

<div class="post-metadata">

**Author:** ![sjuejsuj](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sjuejsuj](https://discourse.slicer.org/u/sjuejsuj)\
**Post date:** [January 4, 2023, 3:46pm UTC](https://discourse.slicer.org/t/error-when-creating-path-in-endoscopy-module/23303/3 "2023-01-04T15:46:57Z")

</div>

I had the same problem, it seems to be an incompatibility caused by version update…  
I will try the older version.  
Thank you!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [January 4, 2023, 7:38pm UTC](https://discourse.slicer.org/t/error-when-creating-path-in-endoscopy-module/23303/4 "2023-01-04T19:38:57Z")

</div>

@sjuejsuj try a newer version rather than old. This was a temporary regression that has since been fixed.

> <https://github.com/Slicer/Slicer/commit/3d66964c524a58b2583aac051e1310a5019d0039>
>
> This commit fixes a regression introduced in a258951f4 (BUG: Consolidate
> vtk.uti…l.numpy\_support imports to fix UnboundLocalError) where the use
> of \`vtk\_to\_numpy\` function was inadvertently removed.

---

<div class="post-metadata">

**Author:** ![sjuejsuj](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sjuejsuj](https://discourse.slicer.org/u/sjuejsuj)\
**Post date:** [January 6, 2023, 12:27pm UTC](https://discourse.slicer.org/t/error-when-creating-path-in-endoscopy-module/23303/6 "2023-01-06T12:27:28Z")

</div>

I try to download the new version of ‘Endoscopy.py’ from Github, and replace current version in ‘.\Slicer 5.0.2\lib\Slicer-5.0\qt-scripted-modules’, then the endoscopy module can operate normally.  
Thank you! 😄

---

<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 6, 2023, 1:02pm UTC](https://discourse.slicer.org/t/error-when-creating-path-in-endoscopy-module/23303/7 "2023-01-06T13:02:01Z")

</div>

@sjuejsuj instead of manually replacing a single file in Slicer 5.0.2, please download and install latest Slicer stable 5.2.1 from [https://download.slicer.org/](https://download.slicer.org/).

---

<div class="post-metadata">

**Author:** ![sjuejsuj](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sjuejsuj](https://discourse.slicer.org/u/sjuejsuj)\
**Post date:** [January 6, 2023, 1:09pm UTC](https://discourse.slicer.org/t/error-when-creating-path-in-endoscopy-module/23303/8 "2023-01-06T13:09:02Z")

</div>

I’ll download the latest Slicer version, thank you!
