# Error when running TotalSegmentator: "Failed to obtain launcher executable name"

**URL:** https://discourse.slicer.org/t/error-when-running-totalsegmentator-failed-to-obtain-launcher-executable-name/36688
**Category:** Support
**Tags:** segmentation, python, totalsegmentator
**Created:** [June 11, 2024, 2:11am UTC](https://discourse.slicer.org/t/error-when-running-totalsegmentator-failed-to-obtain-launcher-executable-name/36688 "2024-06-11T02:11:24Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![khajta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/khajta/32/76581_2.png) [@khajta](https://discourse.slicer.org/u/khajta)
#### Post date: [June 11, 2024, 2:11am UTC](https://discourse.slicer.org/t/error-when-running-totalsegmentator-failed-to-obtain-launcher-executable-name/36688/1 "2024-06-11T02:11:24Z")

</div>

Dear experts,

I tried to use TotalSegmentator extionsion, but it showed the error. Thank you in advance for suggestions.

Failed to compute results.

Command ‘[‘C:/Users/アイソトープ部/AppData/Local/slicer.org/Slicer 5.6.2/bin/…/bin\PythonSlicer.EXE’, ‘C:\Users\アイソトープ部\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe’, ‘-i’, ‘C:/Users/アイソトープ部/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-11\_11+11+08.463/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/アイソトープ部/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-11\_11+11+08.463/segmentation’, ‘–ml’, ‘–task’, ‘total’]’ returned non-zero exit status 1.

Traceback (most recent call last):  
File “C:\Users\アイソトープ部\AppData\Local\slicer.org\Slicer 5.6.2\bin\Python\slicer\util.py”, line 3255, in tryWithErrorDisplay  
yield  
File “C:/Users/アイソトープ部/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 298, in onApplyButton  
self.logic.process(self.ui.inputVolumeSelector.currentNode(), self.ui.outputSegmentationSelector.currentNode(),  
File “C:/Users/アイソトープ部/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 961, in process  
self.processVolume(inputFile, inputVolume,  
File “C:/Users/アイソトープ部/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 1035, in processVolume  
self.logProcessOutput(proc)  
File “C:/Users/アイソトープ部/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 807, in logProcessOutput  
raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)  
subprocess.CalledProcessError: Command ‘[‘C:/Users/アイソトープ部/AppData/Local/slicer.org/Slicer 5.6.2/bin/…/bin\PythonSlicer.EXE’, ‘C:\Users\アイソトープ部\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe’, ‘-i’, ‘C:/Users/アイソトープ部/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-11\_11+11+08.463/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/アイソトープ部/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-11\_11+11+08.463/segmentation’, ‘–ml’, ‘–task’, ‘total’]’ returned non-zero exit status 1.

The box of the left hand side show this error:

Processing started

Writing input file to C:/Users/アイソトープ部/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-11\_11+11+08.463/total-segmentator-input.nii

Creating segmentations with TotalSegmentator AI…

Total Segmentator arguments: [‘-i’, ‘C:/Users/アイソトープ部/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-11\_11+11+08.463/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/アイソトープ部/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-11\_11+11+08.463/segmentation’, ‘–ml’, ‘–task’, ‘total’]

error: Failed to obtain launcher executable name !

---

<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: [June 11, 2024, 12:02pm UTC](https://discourse.slicer.org/t/error-when-running-totalsegmentator-failed-to-obtain-launcher-executable-name/36688/2 "2024-06-11T12:02:03Z")

</div>

Please try to install Slicer in a directory that does not have special characters in its name.

---

<div class="post-metadata">

### Author: ![khajta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/khajta/32/76581_2.png) [@khajta](https://discourse.slicer.org/u/khajta)
#### Post date: [June 11, 2024, 12:06pm UTC](https://discourse.slicer.org/t/error-when-running-totalsegmentator-failed-to-obtain-launcher-executable-name/36688/3 "2024-06-11T12:06:26Z")

</div>

Thank you for your suggestion. It is an office computer in Japan. I will find another folder and let you know the result.

---

<div class="post-metadata">

### Author: ![khajta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/khajta/32/76581_2.png) [@khajta](https://discourse.slicer.org/u/khajta)
#### Post date: [June 12, 2024, 3:32am UTC](https://discourse.slicer.org/t/error-when-running-totalsegmentator-failed-to-obtain-launcher-executable-name/36688/4 "2024-06-12T03:32:01Z")

</div>

This is another error of another PC.

Failed to compute results.

Command ‘[‘C:/Users/khajt/AppData/Local/slicer.org/Slicer 5.6.2/bin/…/bin\PythonSlicer.EXE’, ‘C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe’, ‘-i’, ‘C:/Users/khajt/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-12\_11+12+07.371/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/khajt/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-12\_11+12+07.371/segmentation’, ‘–ml’, ‘–task’, ‘total’]’ returned non-zero exit status 120.

Traceback (most recent call last):  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\bin\Python\slicer\util.py”, line 3255, in tryWithErrorDisplay  
yield  
File “C:/Users/khajt/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 298, in onApplyButton  
self.logic.process(self.ui.inputVolumeSelector.currentNode(), self.ui.outputSegmentationSelector.currentNode(),  
File “C:/Users/khajt/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 961, in process  
self.processVolume(inputFile, inputVolume,  
File “C:/Users/khajt/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 1035, in processVolume  
self.logProcessOutput(proc)  
File “C:/Users/khajt/AppData/Local/slicer.org/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 807, in logProcessOutput  
raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)  
subprocess.CalledProcessError: Command ‘[‘C:/Users/khajt/AppData/Local/slicer.org/Slicer 5.6.2/bin/…/bin\PythonSlicer.EXE’, ‘C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe’, ‘-i’, ‘C:/Users/khajt/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-12\_11+12+07.371/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/khajt/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-12\_11+12+07.371/segmentation’, ‘–ml’, ‘–task’, ‘total’]’ returned non-zero exit status 120.

Processing started  
Writing input file to C:/Users/khajt/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-12\_11+12+07.371/total-segmentator-input.nii  
Creating segmentations with TotalSegmentator AI…  
Total Segmentator arguments: [‘-i’, ‘C:/Users/khajt/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-12\_11+12+07.371/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/khajt/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-12\_11+12+07.371/segmentation’, ‘–ml’, ‘–task’, ‘total’]  
Traceback (most recent call last):  
File “C:\Users\khajt\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\khajt\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\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe\_main_.py", line 7, in   
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\bin\TotalSegmentator.py”, line 127, in main  
totalsegmentator(args.input, args.output, args.ml, args.nr\_thr\_resamp, args.nr\_thr\_saving,  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\python\_api.py”, line 293, in totalsegmentator  
seg\_img, ct\_img = nnUNet\_predict\_image(input, output, task\_id, model=model, folds=folds,  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 375, in nnUNet\_predict\_image  
nnUNetv2\_predict(tmp\_dir, tmp\_dir, tid, model, folds, trainer, tta,  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 178, in nnUNetv2\_predict  
predict\_from\_raw\_data(dir\_in,  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\nnunetv2\inference\predict\_from\_raw\_data.py”, line 347, in predict\_from\_raw\_data  
[i.get() for i in r]  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\multiprocessing\pool.py”, line 736, in **exit**  
self.terminate()  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\multiprocessing\pool.py”, line 654, in terminate  
self.\_terminate()  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\multiprocessing\util.py”, line 224, in **call**  
res = self.\_callback(\*self.\_args, \*\*self.\_kwargs)  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\multiprocessing\pool.py”, line 713, in \_terminate\_pool  
p.terminate()  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\multiprocessing\process.py”, line 133, in terminate  
self.\_popen.terminate()  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\multiprocessing\popen\_spawn\_win32.py”, line 123, in terminate  
\_winapi.TerminateProcess(int(self.\_handle), TERMINATE)  
PermissionError: [WinError 5] Access is denied  
Exception in thread Thread-20:  
Traceback (most recent call last):  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\threading.py”, line 973, in \_bootstrap\_inner  
self.run()  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\threading.py”, line 910, in run  
self.\_target(\*self.\_args, \*\*self.\_kwargs)  
File “C:\Users\khajt\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\batchgenerators\dataloading\multi\_threaded\_augmenter.py”, line 92, in results\_loop  
raise RuntimeError(“One or more background workers are no longer alive. Exiting. Please check the print”  
RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message  
Exception ignored in: \<totalsegmentator.libs.DummyFile object at 0x0000018BCF7F5100\>  
AttributeError: ‘DummyFile’ object has no attribute ‘flush’

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)

No GPU detected. Running on CPU. This can be very slow. The ‘–fast’ or the `--roi_subset` option can help to reduce runtime.  
Resampling…  
Resampled in 5.04s  
Predicting part 1 of 5 …  
Predicting part 2 of 5 …  
Predicting part 3 of 5 …  
Predicting part 4 of 5 …  
Predicting part 5 of 5 …

---

<div class="post-metadata">

### Author: ![Matteboo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/matteboo/32/66548_2.png) [@Matteboo](https://discourse.slicer.org/u/Matteboo)
#### Post date: [June 12, 2024, 2:00pm UTC](https://discourse.slicer.org/t/error-when-running-totalsegmentator-failed-to-obtain-launcher-executable-name/36688/5 "2024-06-12T14:00:52Z")

</div>

> [@khajta](#):
>
> PermissionError: [WinError 5] Access is denied

I’ve never seen that it’s weird. Here is a list of thing that might help :

1. Check that totalSegmentator run on fast mode on the sample data provided by slicer (click the “fast” checkbox to enable this mode)
2. Check that you have enough free space on your computer (If your disk is almost full it can cause issues, if you have 10Go of free space it’s good)
3. Since it’s a permissionerror maybe try to run slicer as Administrator to see if it solves the issue

---

<div class="post-metadata">

### Author: ![khajta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/khajta/32/76581_2.png) [@khajta](https://discourse.slicer.org/u/khajta)
#### Post date: [June 15, 2024, 5:40am UTC](https://discourse.slicer.org/t/error-when-running-totalsegmentator-failed-to-obtain-launcher-executable-name/36688/6 "2024-06-15T05:40:06Z")

</div>

I notice that when I use CT images of Abdomen, it can run without any error. However, it had an error when I use CT inages of Chest + whole abdomen. The error showed following:

Failed to compute results.

Command ‘[‘F:/Slicer/Slicer 5.6.2/bin/…/bin\PythonSlicer.EXE’, ‘F:\Slicer\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe’, ‘-i’, ‘C:/Users/matsubaralab/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-15\_14+28+53.265/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/matsubaralab/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-15\_14+28+53.265/segmentation’, ‘–ml’, ‘–task’, ‘total’]’ returned non-zero exit status 120  
Traceback (most recent call last):  
File “F:\Slicer\Slicer 5.6.2\bin\Python\slicer\util.py”, line 3255, in tryWithErrorDisplay  
yield  
File “F:/Slicer/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 298, in onApplyButton  
self.logic.process(self.ui.inputVolumeSelector.currentNode(), self.ui.outputSegmentationSelector.currentNode(),  
File “F:/Slicer/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 961, in process  
self.processVolume(inputFile, inputVolume,  
File “F:/Slicer/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 1035, in processVolume  
self.logProcessOutput(proc)  
File “F:/Slicer/Slicer 5.6.2/slicer.org/Extensions-32448/TotalSegmentator/lib/Slicer-5.6/qt-scripted-modules/TotalSegmentator.py”, line 807, in logProcessOutput  
raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)  
subprocess.CalledProcessError: Command ‘[‘F:/Slicer/Slicer 5.6.2/bin/…/bin\PythonSlicer.EXE’, ‘F:\Slicer\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe’, ‘-i’, ‘C:/Users/matsubaralab/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-15\_14+28+53.265/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/matsubaralab/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-15\_14+28+53.265/segmentation’, ‘–ml’, ‘–task’, ‘total’]’ returned non-zero exit status 120.

Processing started  
Writing input file to C:/Users/matsubaralab/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-15\_14+28+53.265/total-segmentator-input.nii  
Creating segmentations with TotalSegmentator AI…  
Total Segmentator arguments: [‘-i’, ‘C:/Users/matsubaralab/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-15\_14+28+53.265/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/matsubaralab/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2024-06-15\_14+28+53.265/segmentation’, ‘–ml’, ‘–task’, ‘total’]  
Traceback (most recent call last):  
File “F:\Slicer\Slicer 5.6.2\lib\Python\Lib\runpy.py”, line 197, in \_run\_module\_as\_main  
return \_run\_code(code, main\_globals, None,  
File “F:\Slicer\Slicer 5.6.2\lib\Python\Lib\runpy.py”, line 87, in _run\_code  
exec(code, run\_globals)  
File "F:\Slicer\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe\_main_.py", line 7, in   
File “F:\Slicer\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\bin\TotalSegmentator.py”, line 127, in main  
totalsegmentator(args.input, args.output, args.ml, args.nr\_thr\_resamp, args.nr\_thr\_saving,  
File “F:\Slicer\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\python\_api.py”, line 293, in totalsegmentator  
seg\_img, ct\_img = nnUNet\_predict\_image(input, output, task\_id, model=model, folds=folds,  
File “F:\Slicer\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 375, in nnUNet\_predict\_image  
nnUNetv2\_predict(tmp\_dir, tmp\_dir, tid, model, folds, trainer, tta,  
File “F:\Slicer\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 178, in nnUNetv2\_predict  
predict\_from\_raw\_data(dir\_in,  
File “F:\Slicer\Slicer 5.6.2\lib\Python\Lib\site-packages\nnunetv2\inference\predict\_from\_raw\_data.py”, line 333, in predict\_from\_raw\_data  
np.save(ofile + ‘.npy’, prediction)  
File “F:\Slicer\Slicer 5.6.2\lib\Python\Lib\site-packages\numpy\lib\npyio.py”, line 546, in save  
format.write\_array(fid, arr, allow\_pickle=allow\_pickle,  
File “F:\Slicer\Slicer 5.6.2\lib\Python\Lib\site-packages\numpy\lib\format.py”, line 730, in write\_array  
array.tofile(fp)  
OSError: 1363934700 requested and 0 written  
Exception ignored in: \<totalsegmentator.libs.DummyFile object at 0x00000207772AB970\>  
AttributeError: ‘DummyFile’ object has no attribute ‘flush’

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)

No GPU detected. Running on CPU. This can be very slow. The ‘–fast’ or the `--roi_subset` option can help to reduce runtime.  
Resampling…  
Resampled in 14.75s  
Predicting part 1 of 5 …

Could you suggest for this issue.

---

<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: [June 18, 2024, 7:51pm UTC](https://discourse.slicer.org/t/error-when-running-totalsegmentator-failed-to-obtain-launcher-executable-name/36688/7 "2024-06-18T19:51:26Z")

</div>

If TotalSegmentator works for smaller volumes but not for larger ones then most likely it means that it runs out of memory. You can fix it by cropping and/or resampling the input image using Crop Volume module or upgrade your computer with more memory.
