DentalSegmentator : error loading results : failt to load the segmentation.

Operating system:Windows 11 PRO
Slicer version: 5.12.4
Expected behavior: Segmentation of Cone-Beam using DentalSegmentator extension
Actual behavior: error

2026/10/01 12:32:47.256 :: nnUNet is already installed (2.8.1) and compatible with requested version (nnunetv2).

2026/10/01 12:32:50.322 :: Transferring volume to nnUNet in C:/Users/Bureau01/AppData/Local/Temp/Slicer-WlePvN

2026/10/01 12:32:59.229 :: Starting nnUNet with the following parameters:

2026/10/01 12:32:59.229 ::

2026/10/01 12:32:59.229 :: C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Scripts\nnUNetv2_predict.exe -i C:/Users/Bureau01/AppData/Local/Temp/Slicer-WlePvN/input -o C:/Users/Bureau01/AppData/Local/Temp/Slicer-WlePvN/output -d Dataset111_453CT -tr nnUNetTrainer -p nnUNetPlans -c 3d_fullres -f 0 -npp 1 -nps 1 -step_size 0.5 -device cuda -chk checkpoint_final.pth --disable_tta

2026/10/01 12:32:59.229 ::

2026/10/01 12:32:59.229 :: JSON parameters :

2026/10/01 12:32:59.229 :: {

2026/10/01 12:32:59.229 :: “folds”: “0”,

2026/10/01 12:32:59.229 :: “device”: “cuda”,

2026/10/01 12:32:59.229 :: “stepSize”: 0.5,

2026/10/01 12:32:59.229 :: “disableTta”: true,

2026/10/01 12:32:59.229 :: “nProcessPreprocessing”: 1,

2026/10/01 12:32:59.229 :: “nProcessSegmentationExport”: 1,

2026/10/01 12:32:59.229 :: “checkPointName”: “”,

2026/10/01 12:32:59.229 :: “modelPath”: {

2026/10/01 12:32:59.229 :: “_path”: “C:\\ProgramData\\slicer.org\\3D Slicer 5.12.4\\slicer.org\\Extensions-34645\\DentalSegmentator\\lib\\Slicer-5.12\\qt-scripted-modules\\Resources\\ML”

2026/10/01 12:32:59.229 :: }

2026/10/01 12:32:59.229 :: }

2026/10/01 12:32:59.248 :: nnUNet preprocessing…

2026/10/01 12:33:02.363 :: Traceback (most recent call last):

2026/10/01 12:33:02.363 :: File “”, line 198, in _run_module_as_main

2026/10/01 12:33:02.363 :: File “”, line 88, in _run_code

2026/10/01 12:33:02.363 :: File “C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Scripts\nnUNetv2_predict.exe\_main_.py”, line 2, in

2026/10/01 12:33:02.365 :: File “C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Lib\site-packages\nnunetv2\inference\predict_from_raw_data.py”, line 23, in

2026/10/01 12:33:02.365 :: from nnunetv2.configuration import default_num_processes

2026/10/01 12:33:02.365 :: File “C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Lib\site-packages\nnunetv2\configuration.py”, line 10, in

2026/10/01 12:33:02.365 :: default_n_proc_DA = get_allowed_n_proc_DA()

2026/10/01 12:33:02.365 :: ^^^^^^^^^^^^^^^^^^^^^^^

2026/10/01 12:33:02.365 :: File “C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Lib\site-packages\nnunetv2\utilities\default_n_proc_DA.py”, line 23, in get_allowed_n_proc_DA

2026/10/01 12:33:02.365 :: hostname = subprocess.getoutput([‘hostname’])

2026/10/01 12:33:02.365 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/01 12:33:02.365 :: File “C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Lib\subprocess.py”, line 691, in getoutput

2026/10/01 12:33:02.365 :: return getstatusoutput(cmd, encoding=encoding, errors=errors)[1]

2026/10/01 12:33:02.365 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/01 12:33:02.365 :: File “C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Lib\subprocess.py”, line 671, in getstatusoutput

2026/10/01 12:33:02.365 :: data = check_output(cmd, shell=True, text=True, stderr=STDOUT,

2026/10/01 12:33:02.365 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/01 12:33:02.365 :: File “C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Lib\subprocess.py”, line 466, in check_output

2026/10/01 12:33:02.365 :: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,

2026/10/01 12:33:02.365 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/01 12:33:02.365 :: File “C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Lib\subprocess.py”, line 550, in run

2026/10/01 12:33:02.365 :: stdout, stderr = process.communicate(input, timeout=timeout)

2026/10/01 12:33:02.365 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/01 12:33:02.365 :: File “C:\ProgramData\slicer.org\3D Slicer 5.12.4\lib\Python\Lib\subprocess.py”, line 1196, in communicate

2026/10/01 12:33:02.366 :: stdout = self.stdout.read()

2026/10/01 12:33:02.366 :: ^^^^^^^^^^^^^^^^^^

2026/10/01 12:33:02.366 :: File “”, line 322, in decode

2026/10/01 12:33:02.366 :: UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x82 in position 86: invalid start byte

2026/10/01 12:33:02.881 :: Loading inference results…

2026/10/01 12:33:07.035 :: Error loading results :

2026/10/01 12:33:07.035 :: Failed to load the segmentation.

2026/10/01 12:33:07.035 :: Something went wrong during the nnUNet processing.

2026/10/01 12:33:07.035 :: Please check the logs for potential errors and contact the library maintainers.

Thank you for your help !! Have a nice day !

I tried with the 5.13.0 on an other computer, and it work well… no error.
So i uninstall everything (3d Slicer 5.12 and extensions) on the 1st computer, then I installed 5.13 version and extension (DentalSegmentator) : still the same error :

2026/10/02 09:06:53.981 :: PyTorch Python package is required. Installing… (it may take several minutes)2026/10/02 09:09:04.957 :: nnUNet installation completed successfully.

2026/10/02 09:09:04.961 :: Downloading model weights…

2026/10/02 09:09:29.570 :: Transferring volume to nnUNet in C:/Users/Bureau01/AppData/Local/Temp/Slicer-DKvOSY

2026/10/02 09:09:41.372 :: Starting nnUNet with the following parameters:

2026/10/02 09:09:41.372 ::

2026/10/02 09:09:41.372 :: C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Scripts\nnUNetv2_predict.exe -i C:/Users/Bureau01/AppData/Local/Temp/Slicer-DKvOSY/input -o C:/Users/Bureau01/AppData/Local/Temp/Slicer-DKvOSY/output -d Dataset111_453CT -tr nnUNetTrainer -p nnUNetPlans -c 3d_fullres -f 0 -npp 1 -nps 1 -step_size 0.5 -device cuda -chk checkpoint_final.pth --disable_tta

2026/10/02 09:09:41.372 ::

2026/10/02 09:09:41.372 :: JSON parameters :

2026/10/02 09:09:41.372 :: {

2026/10/02 09:09:41.372 :: “folds”: “0”,

2026/10/02 09:09:41.372 :: “device”: “cuda”,

2026/10/02 09:09:41.372 :: “stepSize”: 0.5,

2026/10/02 09:09:41.372 :: “disableTta”: true,

2026/10/02 09:09:41.372 :: “nProcessPreprocessing”: 1,

2026/10/02 09:09:41.372 :: “nProcessSegmentationExport”: 1,

2026/10/02 09:09:41.372 :: “checkPointName”: “”,

2026/10/02 09:09:41.372 :: “modelPath”: {

2026/10/02 09:09:41.372 :: “_path”: “C:\\ProgramData\\slicer.org\\3D Slicer 5.13.0-2026-09-30\\slicer.org\\Extensions-35317\\DentalSegmentator\\lib\\Slicer-5.13\\qt-scripted-modules\\Resources\\ML”

2026/10/02 09:09:41.372 :: }

2026/10/02 09:09:41.372 :: }

2026/10/02 09:09:41.398 :: nnUNet preprocessing…

2026/10/02 09:09:44.911 :: Traceback (most recent call last):

2026/10/02 09:09:44.911 :: File “”, line 198, in _run_module_as_main

2026/10/02 09:09:44.911 :: File “”, line 88, in _run_code

2026/10/02 09:09:44.911 :: File “C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Scripts\nnUNetv2_predict.exe\_main_.py”, line 2, in

2026/10/02 09:09:44.919 :: File “C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Lib\site-packages\nnunetv2\inference\predict_from_raw_data.py”, line 23, in

2026/10/02 09:09:44.919 :: from nnunetv2.configuration import default_num_processes

2026/10/02 09:09:44.919 :: File “C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Lib\site-packages\nnunetv2\configuration.py”, line 10, in

2026/10/02 09:09:44.919 :: default_n_proc_DA = get_allowed_n_proc_DA()

2026/10/02 09:09:44.919 :: ^^^^^^^^^^^^^^^^^^^^^^^

2026/10/02 09:09:44.919 :: File “C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Lib\site-packages\nnunetv2\utilities\default_n_proc_DA.py”, line 23, in get_allowed_n_proc_DA

2026/10/02 09:09:44.919 :: hostname = subprocess.getoutput([‘hostname’])

2026/10/02 09:09:44.919 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/02 09:09:44.919 :: File “C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Lib\subprocess.py”, line 691, in getoutput

2026/10/02 09:09:44.919 :: return getstatusoutput(cmd, encoding=encoding, errors=errors)[1]

2026/10/02 09:09:44.919 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/02 09:09:44.919 :: File “C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Lib\subprocess.py”, line 671, in getstatusoutput

2026/10/02 09:09:44.919 :: data = check_output(cmd, shell=True, text=True, stderr=STDOUT,

2026/10/02 09:09:44.919 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/02 09:09:44.919 :: File “C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Lib\subprocess.py”, line 466, in check_output

2026/10/02 09:09:44.919 :: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,

2026/10/02 09:09:44.919 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/02 09:09:44.919 :: File “C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Lib\subprocess.py”, line 550, in run

2026/10/02 09:09:44.919 :: stdout, stderr = process.communicate(input, timeout=timeout)

2026/10/02 09:09:44.919 :: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2026/10/02 09:09:44.919 :: File “C:\ProgramData\slicer.org\3D Slicer 5.13.0-2026-09-30\lib\Python\Lib\subprocess.py”, line 1196, in communicate

2026/10/02 09:09:44.919 :: stdout = self.stdout.read()

2026/10/02 09:09:44.919 :: ^^^^^^^^^^^^^^^^^^

2026/10/02 09:09:44.919 :: File “”, line 322, in decode

2026/10/02 09:09:44.919 :: UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x82 in position 86: invalid start byte

2026/10/02 09:09:45.449 :: Loading inference results…

2026/10/02 09:09:50.156 :: Error loading results :

2026/10/02 09:09:50.156 :: Failed to load the segmentation.

2026/10/02 09:09:50.156 :: Something went wrong during the nnUNet processing.

2026/10/02 09:09:50.156 :: Please check the logs for potential errors and contact the library maintainers.

Let me know if you can help me ! Thank you !

Hi @samzou974,

Thanks for reporting this error.
I’m investigating where the problem may come from and I’ll get back to you if I have a solution to test.

Hi @samzou974,

Looking at the nnUNet code, it seems to be accessing the hostname at some given time which will yield problems depending on the host local langage.

Can you try defining the following env variables in your console and running the inference:

import os

cpu_count = os.cpu_count() or 1
os.environ["nnUNet_n_proc_DA"] = str(min(12, cpu_count))
os.environ["nnUNet_def_n_proc"] = str(min(8, cpu_count))

It works well !! Thank you very much !
Do I will have to define the env fariables each time i use 3dSlicer or Dentalsegmentator ?

Happy that it works.

For now, you can add it to your .slicerrc.py file and it will be applied automatically.
I have pushed a fix in the SlicerNNUNet repo that will apply this logic internally before starting the subprocess. It should be available in future Slicer versions.