I am trying to use TotalSegmentator but I have a problem : “Traceback (most recent call last):
File “C:\Users\maria\AppData\Local\slicer.org\Slicer 5.6.2\bin\Python\slicer\util.py”, line 3255, in tryWithErrorDisplay
yield
File “C:/Users/maria/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/maria/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/maria/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/maria/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/maria/AppData/Local/slicer.org/Slicer 5.6.2/bin/…/bin\PythonSlicer.EXE’, ‘C:\Users\maria\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe’, ‘-i’, ‘C:/Users/maria/AppData/Local/slicer.org/Slicer 5.6.2/__SlicerTemp__2024-05-27_15+18+36.694/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/maria/AppData/Local/slicer.org/Slicer 5.6.2/__SlicerTemp__2024-05-27_15+18+36.694/segmentation’, ‘–ml’, ‘–task’, ‘total’, ‘–fast’]’ returned non-zero exit status 1.” I don’t undersantand where the problem comes from ? Thank you for your help.
Yes: here is my problem : Processing started
Writing input file to C:/Users/maria/AppData/Local/slicer.org/Slicer 5.6.2/__SlicerTemp__2024-05-27_15+33+06.139/total-segmentator-input.nii
Creating segmentations with TotalSegmentator AI…
Total Segmentator arguments: [‘-i’, ‘C:/Users/maria/AppData/Local/slicer.org/Slicer 5.6.2/__SlicerTemp__2024-05-27_15+33+06.139/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/maria/AppData/Local/slicer.org/Slicer 5.6.2/__SlicerTemp__2024-05-27_15+33+06.139/segmentation’, ‘–ml’, ‘–task’, ‘total’]
Traceback (most recent call last):
File “C:\Users\maria\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\maria\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\maria\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Scripts\TotalSegmentator.exe_main.py", line 4, in
File “C:\Users\maria\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\bin\TotalSegmentator.py”, line 8, in
from totalsegmentator.python_api import totalsegmentator
File “C:\Users\maria\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\python_api.py”, line 11, in
from totalsegmentator.statistics import get_basic_statistics, get_radiomics_features_for_entire_dir
File “C:\Users\maria\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\totalsegmentator\statistics.py”, line 8, in
import pandas as pd
File "C:\Users\maria\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\pandas_init.py", line 77, in
from pandas.core.api import (
File “C:\Users\maria\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\pandas\core\api.py”, line 1, in
from pandas.libs import (
File "C:\Users\maria\AppData\Local\slicer.org\Slicer 5.6.2\lib\Python\Lib\site-packages\pandas_libs_init.py", line 16, in
import pandas._libs.pandas_parser # isort: skip # type: ignore[reportUnusedImport]
ModuleNotFoundError: No module named ‘pandas._libs.pandas_parser’
It seems that some required Python libraries were not installed correctly (or an incompatible version was installed by some other extensions). “Force reinstall” in “Advanced” section in TotalSegmentator module should fix the issue. If not then you may need to install Slicer from scratch again.