# TotalSegmentator + "returned non-zero exit status 1."

**URL:** <https://discourse.slicer.org/t/totalsegmentator-returned-non-zero-exit-status-1/42395>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [April 1, 2025, 1:22pm UTC](https://discourse.slicer.org/t/totalsegmentator-returned-non-zero-exit-status-1/42395 "2025-04-01T13:22:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Camille\_Guillerminet](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/camille_guillerminet/32/79882_2.png) [@Camille\_Guillerminet](https://discourse.slicer.org/u/Camille_Guillerminet)\
**Post date:** [April 1, 2025, 1:22pm UTC](https://discourse.slicer.org/t/totalsegmentator-returned-non-zero-exit-status-1/42395/1 "2025-04-01T13:22:51Z")

</div>

Operating system: Windows 10  
Slicer version:5.6.2 + CPU

Dear support,

I tried to run totalsegmentator but it failed after a while with the “returned non-zero exit status 1”.  
Could you help me to understand what is the probleme?

I copied below the message error of the pop-up window.

“Processing started  
Writing input file to C:/Users/c.guillerminet/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2025-04-01\_14+46+42.002/total-segmentator-input.nii  
Creating segmentations with TotalSegmentator AI…  
Total Segmentator arguments: [‘-i’, ‘C:/Users/c.guillerminet/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2025-04-01\_14+46+42.002/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/c.guillerminet/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2025-04-01\_14+46+42.002/segmentation’, ‘–task’, ‘body’, ‘–fast’]  
Traceback (most recent call last):  
File “C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\runpy.py”, line 197, in \_run\_module\_as\_main  
return _run\_code(code, main\_globals, None,  
File “C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\runpy.py”, line 87, in run\_code  
exec(code, run\_globals)  
File "C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe\_main.py", line 7, in   
File “C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\bin\TotalSegmentator.py”, line 141, in main  
totalsegmentator(args.input, args.output, args.ml, args.nr\_thr\_resamp, args.nr\_thr\_saving,  
File “C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\python\_api.py”, line 127, in totalsegmentator  
from totalsegmentator.nnunet import nnUNet\_predict\_image # this has to be after setting new env vars  
File “C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 40, in   
from totalsegmentator.dicom\_io import dcm\_to\_nifti, save\_mask\_as\_rtstruct  
File “C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\dicom\_io.py”, line 13, in   
import dicom2nifti  
File "C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\dicom2nifti\_init_.py”, line 19, in   
from dicom2nifti.convert\_dicom import dicom\_series\_to\_nifti  
File “C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\dicom2nifti\convert\_dicom.py”, line 17, in   
import dicom2nifti.common as common  
File “C:\Users\c.guillerminet\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\dicom2nifti\common.py”, line 16, in   
from pydicom.pixels import apply\_modality\_lut  
ModuleNotFoundError: No module named ‘pydicom.pixels’  
No GPU detected. Running on CPU. This can be very slow. The ‘–fast’ or the `--roi_subset` option can help to reduce runtime.

If you use this tool please cite: [https://pubs.rsna.org/doi/10.1148/ryai.230024](https://pubs.rsna.org/doi/10.1148/ryai.230024)"

Sincerely yours,  
Camille

---

<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:** [April 1, 2025, 2:00pm UTC](https://discourse.slicer.org/t/totalsegmentator-returned-non-zero-exit-status-1/42395/2 "2025-04-01T14:00:48Z")

</div>

> [@TotalSegmentator + Slicer 5.8.1 - "ModuleNotFoundError: No module named 'pydicom.pixels'"](https://discourse.slicer.org/t/totalsegmentator-slicer-5-8-1-modulenotfounderror-no-module-named-pydicom-pixels/42386/2):
>
> Thanks for reporting. The issue is due to an unused Python package (dicom2nifti) released a corrupted version for Python-3.9 a few days ago. The [error is reported to dicom2nifti developers](https://github.com/icometrix/dicom2nifti/issues/155) and a [fix is already implemented in TotalSegmentator extension](https://github.com/lassoan/SlicerTotalSegmentator/issues/72). The fix will be available in the Extensions Manager from tomorrow. If you use the latest Slicer Preview Release (currently Slicer-5.8.1), then tomorrow you can go to the Extensions Manager and click “Check for updates” and then “Update all” to ge…

^ Please try using latest Slicer stable 5.8.1 as the fix should be available now.
