Totalsegmentator failing with error 120

Most likely the issue is that the dynamic-network-architectures is somehow corrupted. Maybe you have some old corrupted copy in the pip cache.

First of all, check its version:

from importlib.metadata import version
print(version("dynamic_network_architectures"))

Then check if you can import dynamic_network_architectures and its path is within the Slicer build tree:

import dynamic_network_architectures
import inspect
print(inspect.getabsfile(dynamic_network_architectures))

Then check if you can load ResidualEncoderUNet and it is in the correct location:

from dynamic_network_architectures.architectures.unet import ResidualEncoderUNet
print(inspect.getabsfile(ResidualEncoderUNet))

If this fails check if the content of your dynamic_network_architectures file folder matches the content of the folder on my computer (from a working TotalSegmentator installation): site-packages.zip