Failed to get TotalSegmentator package version on macOS

FYI - on a Mac, when I push the button to get package version information, I am getting this error:


Traceback (most recent call last):
  File "/Applications/Slicer", line 3146, in tryWithErrorDisplay
  File "/Applications/Slicer", line 300, in onPackageInfoUpdate
    self.ui.packageInfoTextBrowser.plainText = self.logic.installedTotalSegmentatorPythonPackageInfo().rstrip()
  File "/Applications/Slicer", line 564, in installedTotalSegmentatorPythonPackageInfo
    versionInfo = subprocess.check_output([shutil.which('PythonSlicer'), "-m", "pip", "show", "TotalSegmentator"]).decode()
  File "/Applications/Slicer", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Applications/Slicer", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Applications/Slicer', '-m', 'pip', 'show', 'TotalSegmentator']' returned non-zero exit status 1.

Have you already installed TotalSegmentator?

What do you see if you start a command terminal and run this?

/Applications/Slicer -m pip show TotalSegmentator

I installed the extension, and didn’t think I need to install something else. I did not realize that TotalSegmentator is not installed until I try to “Apply”. I guess it might be good to disable buttons that are not applicable, but since no one else raised this other than me, it is definitely not a priority.

1 Like

Agreed. We should display a more meaningful message. I’ve added an issue to track this:

1 Like

One should either load a volume and press “Apply” (which should install TotalSegmentator if not already there) or “Force reinstall” (under “Advanced”).