# Total Segmentator on 5.2.2 "scikit-learn" distribution not found

**URL:** https://discourse.slicer.org/t/total-segmentator-on-5-2-2-scikit-learn-distribution-not-found/28727
**Category:** Support
**Created:** [April 3, 2023, 12:07pm UTC](https://discourse.slicer.org/t/total-segmentator-on-5-2-2-scikit-learn-distribution-not-found/28727 "2023-04-03T12:07:02Z")
**Posts on this page:** 3
**Page:** 2

<div class="post-metadata">

### Author: ![whu](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@whu](https://discourse.slicer.org/u/whu)
#### Post date: [April 25, 2023, 11:23am UTC](https://discourse.slicer.org/t/total-segmentator-on-5-2-2-scikit-learn-distribution-not-found/28727/22 "2023-04-25T11:23:40Z")

</div>

thanks very much.  
the output results is as follows:  
Processing started  
Writing input file to C:/Users/whu/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2023-04-25\_19+22+09.770/total-segmentator-input.nii  
Creating segmentations with TotalSegmentator AI…  
Total Segmentator arguments: [‘-i’, ‘C:/Users/whu/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2023-04-25\_19+22+09.770/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/whu/AppData/Local/Temp/Slicer/\_\_SlicerTemp\_\_2023-04-25\_19+22+09.770/segmentation’, ‘–ml’, ‘–task’, ‘total’, ‘–fast’]  
Traceback (most recent call last):  
File “C:\SlicerInstall\Slicer 5.3.0\lib\Python\Scripts\TotalSegmentator”, line 93, in   
main()  
File “C:\SlicerInstall\Slicer 5.3.0\lib\Python\Scripts\TotalSegmentator”, line 86, in main  
totalsegmentator(args.input, args.output, args.ml, args.nr\_thr\_resamp, args.nr\_thr\_saving,  
File “C:\SlicerInstall\Slicer 5.3.0\lib\Python\Lib\site-packages\totalsegmentator\python\_api.py”, line 173, in totalsegmentator  
seg = nnUNet\_predict\_image(input, output, task\_id, model=model, folds=folds,  
File “C:\SlicerInstall\Slicer 5.3.0\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 255, in nnUNet\_predict\_image  
nnUNet\_predict(tmp\_dir, tmp\_dir, task\_id, model, folds, trainer, tta)  
File “C:\SlicerInstall\Slicer 5.3.0\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 106, in nnUNet\_predict  
predict\_from\_folder(model\_folder\_name, dir\_in, dir\_out, folds, save\_npz, num\_threads\_preprocessing,  
File “C:\SlicerInstall\Slicer 5.3.0\lib\Python\Lib\site-packages\nnunet\inference\predict.py”, line 616, in predict\_from\_folder  
shutil.copy(join(model, ‘plans.pkl’), output\_folder)  
File “C:\SlicerInstall\Slicer 5.3.0\lib\Python\Lib\shutil.py”, line 427, in copy  
copyfile(src, dst, follow\_symlinks=follow\_symlinks)  
File “C:\SlicerInstall\Slicer 5.3.0\lib\Python\Lib\shutil.py”, line 264, in copyfile  
with open(src, ‘rb’) as fsrc:  
FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Users\whu\.totalsegmentator\nnunet\results\nnUNet\3d\_fullres\Task256\_TotalSegmentator\_3mm\_1139subj\nnUNetTrainerV2\_ep8000\_nomirror\_\_nnUNetPlansv2.1\plans.pkl’  
Exception ignored in: \<totalsegmentator.libs.DummyFile object at 0x000001D0B7DD8A00\>  
AttributeError: ‘DummyFile’ object has no attribute ‘flush’

If you use this tool please cite: [[2208.05868] TotalSegmentator: robust segmentation of 104 anatomical structures in CT images](https://doi.org/10.48550/arXiv.2208.05868)

Using ‘fast’ option: resampling to lower resolution (3mm)  
Resampling…  
Resampled in 0.47s  
Predicting…

---

<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: [April 25, 2023, 11:46am UTC](https://discourse.slicer.org/t/total-segmentator-on-5-2-2-scikit-learn-distribution-not-found/28727/23 "2023-04-25T11:46:21Z")

</div>

> [@whu](#):
>
> FileNotFoundError: [Errno 2] No such file or directory:

Thank you for posting the full output. This message confirms that the issue is that download of the model weights was incomplete. I would recommend to download the weights from Zenodo manually, using your web browser, and place it in the TotalSegmentator folder in your user folder, replacing the incomplete download that is already there.

---

<div class="post-metadata">

### Author: ![whu](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@whu](https://discourse.slicer.org/u/whu)
#### Post date: [April 25, 2023, 12:44pm UTC](https://discourse.slicer.org/t/total-segmentator-on-5-2-2-scikit-learn-distribution-not-found/28727/25 "2023-04-25T12:44:29Z")

</div>

I solved it. thanks 😄

[Previous page](https://discourse.slicer.org/t/total-segmentator-on-5-2-2-scikit-learn-distribution-not-found/28727.md?page=1)
