# An error was reported en route using AI（Lungmask R321） of Lungsegmentation

**URL:** <https://discourse.slicer.org/t/an-error-was-reported-en-route-using-ai-lungmask-r321-of-lungsegmentation/28653>\
**Category:** Support\
**Tags:** segmentation, python, masking, lungctanalyzer, ai\
**Created:** [March 29, 2023, 2:08pm UTC](https://discourse.slicer.org/t/an-error-was-reported-en-route-using-ai-lungmask-r321-of-lungsegmentation/28653 "2023-03-29T14:08:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhenhua3](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zhenhua3](https://discourse.slicer.org/u/zhenhua3)\
**Post date:** [March 29, 2023, 2:08pm UTC](https://discourse.slicer.org/t/an-error-was-reported-en-route-using-ai-lungmask-r321-of-lungsegmentation/28653/1 "2023-03-29T14:08:16Z")

</div>

Dear development team of LungCTanalyzer or Dear Rudolf Bumm professor  
I have an error while using your AI program, can you please help me solve this problem？  
This is my error record：

 ![1680098506351](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/0/1079b6fde6e6ce4ffca626aa2c584c12645fd654.jpeg)  
@rbumm

---

<div class="post-metadata">

**Author:** ![zhenhua3](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zhenhua3](https://discourse.slicer.org/u/zhenhua3)\
**Post date:** [March 29, 2023, 2:10pm UTC](https://discourse.slicer.org/t/an-error-was-reported-en-route-using-ai-lungmask-r321-of-lungsegmentation/28653/2 "2023-03-29T14:10:23Z")

</div>

The following is the complete error record of Python：  
**[Qt] QLayout::addChildLayout: layout “” already has a parent**

**[Qt] ctkSliderWidget::setSingleStep() 0 is out of bounds. 0 1000 1**

**[Qt] ctkSliderWidget::setSingleStep() 0 is out of bounds. 0 100 1**

**[Python] Failed to compute results: cannot import name '_marching\_cubes\_lewiner\_cy’ from partially initialized module ‘skimage.measure’ (most likely due to a circular import) (D:\120\Slicer 5.2.2\lib\Python\Lib\site-packages\skimage\measure\_init_.py)**

**Traceback (most recent call last):**

**File “D:/120/Slicer 5.2.2/NA-MIC/Extensions-31382/LungCTAnalyzer/lib/Slicer-5.2/qt-scripted-modules/LungCTSegmenter.py”, line 927, in runProcessing**

**self.logic.applySegmentation()**

**File “D:/120/Slicer 5.2.2/NA-MIC/Extensions-31382/LungCTAnalyzer/lib/Slicer-5.2/qt-scripted-modules/LungCTSegmenter.py”, line 2066, in applySegmentation**

**from lungmask import mask**

**File “D:\120\Slicer 5.2.2\lib\Python\Lib\site-packages\lungmask\mask.py”, line 3, in**

**from lungmask import utils**

**File “D:\120\Slicer 5.2.2\lib\Python\Lib\site-packages\lungmask\utils.py”, line 2, in**

**import skimage.measure**

**File “D:\120\Slicer 5.2.2\lib\Python\Lib\site-packages\skimage\measure\__init_\_.py”, line 2, in**

**from .\_marching\_cubes\_lewiner import marching\_cubes, mesh\_surface\_area**

**File “D:\120\Slicer 5.2.2\lib\Python\Lib\site-packages\skimage\measure\_marching\_cubes\_lewiner.py”, line 6, in**

**from . import \_marching\_cubes\_lewiner\_cy**

**ImportError: cannot import name '_marching\_cubes\_lewiner\_cy’ from partially initialized module ‘skimage.measure’ (most likely due to a circular import) (D:\120\Slicer 5.2.2\lib\Python\Lib\site-packages\skimage\measure\_init_.py)**

**[VTK] Warning: In D:\D\S\S-0\Libs\MRML\Core\vtkMRMLSegmentationDisplayNode.cxx, line 287**

**[VTK] vtkMRMLSegmentationDisplayNode (000002675058FDD0): vtkMRMLSegmentationDisplayNode::GetSegmentDisplayProperties: no display properties are found for segment ID=, return default**

---

<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:** [March 29, 2023, 3:11pm UTC](https://discourse.slicer.org/t/an-error-was-reported-en-route-using-ai-lungmask-r321-of-lungsegmentation/28653/3 "2023-03-29T15:11:45Z")

</div>

Hello,

The Lung CT Analyzer just wraps code around existent (great) AI tools like “lungmask” by Johannes Hofmanninger and “TotalSegmentator” by Jakob Wasserthal / “TotalSegmenator extension” by @lassoan.

“lungmask” works perfectly fine on two of my test systems as well as on an AWS EC2 cloud instance. All are equipped with Nvidia GPUs and low (6 GB) to moderate/high (24 GB) dedicated video RAM.  
Could you provide some details of your system?

- Operating system
- 3D Slicer version
- Lung CT Analyzer version
- Type and model of GPU
- dedicated video RAM

Thank you.

---

<div class="post-metadata">

**Author:** ![zhenhua3](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zhenhua3](https://discourse.slicer.org/u/zhenhua3)\
**Post date:** [March 29, 2023, 3:25pm UTC](https://discourse.slicer.org/t/an-error-was-reported-en-route-using-ai-lungmask-r321-of-lungsegmentation/28653/4 "2023-03-29T15:25:20Z")

</div>

- Operating system：win11
- 3D Slicer version：5.22
- Lung CT Analyzer version：Latest version  
RAM:24GB  
My computer hardware is for the use of AI,Because I have used it smoothly before,But I reinstalled Python on my computer, and then he got the above error and couldn’t use AI，I don’t know why it’s getting an error and how I can fix it？

---

<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:** [March 29, 2023, 3:29pm UTC](https://discourse.slicer.org/t/an-error-was-reported-en-route-using-ai-lungmask-r321-of-lungsegmentation/28653/5 "2023-03-29T15:29:57Z")

</div>

You will probably just need to uninstall 3D Slicer and completely remove the 3D Slicer installation folder, then reinstall 3D Slicer as well as the Lung CT Analyzer extension and all dependencies. Somehow your Slicer Python seems to have been messed up.

---

<div class="post-metadata">

**Author:** ![zhenhua3](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zhenhua3](https://discourse.slicer.org/u/zhenhua3)\
**Post date:** [March 29, 2023, 3:30pm UTC](https://discourse.slicer.org/t/an-error-was-reported-en-route-using-ai-lungmask-r321-of-lungsegmentation/28653/6 "2023-03-29T15:30:17Z")

</div>

@Johannes Hofmanninger  
Dear Johannes  
I would appreciate you if you could help me with a problem

---

<div class="post-metadata">

**Author:** ![zhenhua3](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zhenhua3](https://discourse.slicer.org/u/zhenhua3)\
**Post date:** [March 29, 2023, 3:32pm UTC](https://discourse.slicer.org/t/an-error-was-reported-en-route-using-ai-lungmask-r321-of-lungsegmentation/28653/7 "2023-03-29T15:32:28Z")

</div>

Okay, I’ll try it tomorrow.thank you
