TotalSegmentator failed to compute results - file not found

Hello, Lassoan.
Firstly, thank you for sharing this awesome extension, SlicerTotalSegmentator

During using this(actually for first time), I faced an error issue
Could you give me any advice about that?

for information, my GPU is GeForce RTX 3090 Ti which has 24GB

Please try the CTChest sample dataset. Is there still an error message?

@3omeoneS

Could you please check if you can find more specific error messages in the textbox below the Apply button after clicking OK on the popup?
You can also look for more details in the application log that you can get in menu: Help / Report a bug.

well… what is difference between my sample and CT chest sample?
I think they are same actually. :sob:

well… I posted bug log… but the system made it hidden;;
they thought it was spam -_-;;

TotalSegmentator.py:452) - FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Users\computer\.totalsegmentator\nnunet\results\nnUNet\3d_fullres\Task253_TotalSegmentator_part3_cardiac_1139subj\nnUNetTrainerV2_ep4000_nomirror__nnUNetPlansv2.1\plans.pkl’
TotalSegmentator.py:452) - Exception ignored in: <totalsegmentator.libs.DummyFile object at 0x0000024A418D96A0>
TotalSegmentator.py:452) - AttributeError: ‘DummyFile’ object has no attribute ‘flush’

A post was split to a new topic: TotalSegmentator fails with error 120

This is very useful information. It means that the first time you have run TotalSegmentator the model download was incomplete (either network transient network problem or you were not patient enough and interrupted).

You can fix this by deleting the C:\Users\computer\.totalsegmentator folder and restart. Normally model download completes within a couple of minutes, but just in case, give it an hour.

Sorry to late reply

well… the log file can’t be uploaded;;
so I look into log and here is the point where the bug was started

--------------------------------------------------------------------------------
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) -   File "C:\Users\@@@@\AppData\Local\NA-MIC\Slicer 5.2.1\lib\Python\Lib\shutil.py", line 264, in copyfile
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) -     with open(src, 'rb') as fsrc:
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\@@@@\\.totalsegmentator\\nnunet\\results\\nnUNet\\3d_fullres\\Task253_TotalSegmentator_part3_cardiac_1139subj\\nnUNetTrainerV2_ep4000_nomirror__nnUNetPlansv2.1\\plans.pkl'
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - Exception ignored in: <totalsegmentator.libs.DummyFile object at 0x0000024A418D96A0>
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - AttributeError: 'DummyFile' object has no attribute 'flush'
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - Downloading pretrained weights for Task 254 (~230MB) ...
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - Download finished. Extracting...
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) -   downloaded in 65.10s
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - Downloading pretrained weights for Task 255 (~230MB) ...
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - Download finished. Extracting...
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) -   downloaded in 59.25s
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - Resampling...
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) -   Resampled in 6.94s
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - Predicting part 0 of 5 ...
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - Predicting part 1 of 5 ...
[INFO][Python] 09.01.2023 08:56:07 [Python] (C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py:452) - Predicting part 2 of 5 ...
[ERROR][Python] 09.01.2023 08:56:08 [Python] (C:\Users\@@@@\AppData\Local\NA-MIC\Slicer 5.2.1\bin\Python\slicer\util.py:2730) - Failed to compute results.

Command '['C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/bin/../bin\\PythonSlicer.EXE', 'C:\\Users\\@@@@\\AppData\\Local\\NA-MIC\\Slicer 5.2.1\\lib\\Python\\Scripts\\TotalSegmentator', '-i', 'C:/Users/@@@@/AppData/Local/Temp/Slicer/__SlicerTemp__2023-01-09_08+53+26.103/total-segmentator-input.nii', '-o', 'C:/Users/@@@@/AppData/Local/Temp/Slicer/__SlicerTemp__2023-01-09_08+53+26.103/segmentation', '--ml', '--task', 'total']' returned non-zero exit status 120.
[CRITICAL][Stream] 09.01.2023 08:56:44 [] (unknown:0) - Traceback (most recent call last):
[CRITICAL][Stream] 09.01.2023 08:56:44 [] (unknown:0) -   File "C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py", line 258, in onApplyButton
[CRITICAL][Stream] 09.01.2023 08:56:44 [] (unknown:0) -     self.logic.process(self.ui.inputVolumeSelector.currentNode(), self.ui.outputSegmentationSelector.currentNode(),
[CRITICAL][Stream] 09.01.2023 08:56:44 [] (unknown:0) -   File "C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py", line 715, in process
[CRITICAL][Stream] 09.01.2023 08:56:44 [] (unknown:0) -     self.logProcessOutput(proc)
[CRITICAL][Stream] 09.01.2023 08:56:44 [] (unknown:0) -   File "C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/NA-MIC/Extensions-31317/TotalSegmentator/lib/Slicer-5.2/qt-scripted-modules/TotalSegmentator.py", line 624, in logProcessOutput
[CRITICAL][Stream] 09.01.2023 08:56:44 [] (unknown:0) -     raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)
[CRITICAL][Stream] 09.01.2023 08:56:44 [] (unknown:0) - subprocess.CalledProcessError: Command '['C:/Users/@@@@/AppData/Local/NA-MIC/Slicer 5.2.1/bin/../bin\\PythonSlicer.EXE', 'C:\\Users\\@@@@\\AppData\\Local\\NA-MIC\\Slicer 5.2.1\\lib\\Python\\Scripts\\TotalSegmentator', '-i', 'C:/Users/@@@@/AppData/Local/Temp/Slicer/__SlicerTemp__2023-01-09_08+53+26.103/total-segmentator-input.nii', '-o', 'C:/Users/@@@@/AppData/Local/Temp/Slicer/__SlicerTemp__2023-01-09_08+53+26.103/segmentation', '--ml', '--task', 'total']' returned non-zero exit status 120.
--------------------------------------------------------------------------------

cf) I changed my computer's domain name to '@@@@'

File uploads should be kept at minimum to keep hosting costs under control. You can upload any files anywhere (your dropbox, onedrive, google drive, etc.) and just post the link here.

WOW AMAZING! It worked!!!

I think, the problem was GPU issue.
When I uses this for first time, my computer GPU status was running on other works(deep learning stuff).
And for following your adivce, I cleaned whole GPU cash, and delete TotalSegmentator and restart → finally It worked.

Thank you.

1 Like