lassoan / SlicerMONAIAuto3DSeg

Extension for 3D Slicer for running MONAI Auto3DSeg models
MIT License
67 stars 10 forks source link

Fresh install of today's nightly doesn't run #63

Closed pieper closed 6 months ago

pieper commented 6 months ago

I downloaded Slicer-5.7.0-2024-05-03-linux-amd64 and installed the Auto3DSeg extension and tried applying it to the CTChest SampleData.

Session start time .......: 20240508_150808
Slicer version ...........: 5.7.0-2024-05-03 (revision 32840 / 7517984) linux-amd64 - installed release
Operating system .........: Linux / 5.15.0-91-generic / #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 / UTF-8 - 64-bit
Memory ...................: 125782 MB physical, 0 MB virtual
CPU ......................: AuthenticAMD AMD EPYC-Milan Processor, 32 cores, 32 logical processors
VTK configuration ........: OpenGL2 rendering, TBB threading
Qt configuration .........: version 5.15.2, with SSL, requested OpenGL 3.2 (core profile)
Internationalization .....: disabled, language=
Developer mode ...........: disabled
Application path .........: /home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/bin
Additional module paths ..: slicer.org/Extensions-32840/MONAIAuto3DSeg/lib/Slicer-5.7/qt-scripted-modules, slicer.org/Extensions-32840/PyTorch/lib/Slicer-5.7/qt-scripted-modules
Scripted subject hierarchy plugin registered: SegmentEditor
Scripted subject hierarchy plugin registered: SegmentStatistics
Switch to module:  "Welcome"
Switch to module:  "SampleData"
Requesting download CT-chest.nrrd from https://github.com/Slicer/SlicerTestingData/releases/download/SHA256/4507b664690840abb6cb9af2d919377ffc4ef75b167cb6fd0f747befdb12e38e ...
Downloaded 4.0 MB (10% of 40.2 MB)...
Downloaded 8.1 MB (20% of 40.2 MB)...
Downloaded 12.1 MB (30% of 40.2 MB)...
Downloaded 16.1 MB (40% of 40.2 MB)...
Downloaded 20.1 MB (50% of 40.2 MB)...
Downloaded 24.1 MB (60% of 40.2 MB)...
Downloaded 28.2 MB (70% of 40.2 MB)...
Downloaded 32.2 MB (80% of 40.2 MB)...
Downloaded 36.2 MB (90% of 40.2 MB)...
Downloaded 40.2 MB (100% of 40.2 MB)...
Download finished
Verifying checksum
Checksum OK
Requesting load CTChest from /home/exouser/.cache/slicer.org/Slicer/SlicerIO/CT-chest.nrrd ...
"Volume" Reader has successfully read the file "/home/exouser/.cache/slicer.org/Slicer/SlicerIO/CT-chest.nrrd" "[0.56s]"
Load finished

Switch to module:  "MONAIAuto3DSeg"
Traceback (most recent call last):
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/slicer.org/Extensions-32840/MONAIAuto3DSeg/lib/Slicer-5.7/qt-scripted-modules/MONAIAuto3DSeg.py", line 703, in loadModelsDescription
    modelsTree = json.load(f)["models"]
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/lib/Python/lib/python3.9/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/lib/Python/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/lib/Python/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/lib/Python/lib/python3.9/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 315 column 9 (char 9480)
Traceback (most recent call last):
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/slicer.org/Extensions-32840/MONAIAuto3DSeg/lib/Slicer-5.7/qt-scripted-modules/MONAIAuto3DSeg.py", line 703, in loadModelsDescription
    modelsTree = json.load(f)["models"]
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/lib/Python/lib/python3.9/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/lib/Python/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/lib/Python/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/lib/Python/lib/python3.9/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 315 column 9 (char 9480)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/slicer.org/Extensions-32840/MONAIAuto3DSeg/lib/Slicer-5.7/qt-scripted-modules/MONAIAuto3DSeg.py", line 210, in setup
    self.logic = MONAIAuto3DSegLogic()
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/slicer.org/Extensions-32840/MONAIAuto3DSeg/lib/Slicer-5.7/qt-scripted-modules/MONAIAuto3DSeg.py", line 670, in __init__
    self.models = self.loadModelsDescription()
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/slicer.org/Extensions-32840/MONAIAuto3DSeg/lib/Slicer-5.7/qt-scripted-modules/MONAIAuto3DSeg.py", line 753, in loadModelsDescription
    raise RuntimeError(f"Failed to load models description from {modelsJsonFilePath}")
RuntimeError: Failed to load models description from /home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/slicer.org/Extensions-32840/MONAIAuto3DSeg/lib/Slicer-5.7/qt-scripted-modules/Resources/Models.json
Traceback (most recent call last):
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/slicer.org/Extensions-32840/MONAIAuto3DSeg/lib/Slicer-5.7/qt-scripted-modules/MONAIAuto3DSeg.py", line 260, in enter
    self.initializeParameterNode()
  File "/home/exouser/Downloads/Slicer-5.7.0-2024-05-03-linux-amd64/slicer.org/Extensions-32840/MONAIAuto3DSeg/lib/Slicer-5.7/qt-scripted-modules/MONAIAuto3DSeg.py", line 291, in initializeParameterNode
    self.setParameterNode(self.logic.getParameterNode())
AttributeError: 'NoneType' object has no attribute 'getParameterNode'
diazandr3s commented 6 months ago

Many thanks for reporting this, @pieper. Yesterday I added the whole body CT segmentation model for full res on TSV2 and added a comma where I shouldn't. This PR fixes that: https://github.com/lassoan/SlicerMONAIAuto3DSeg/pull/64/files

Thanks again!

diazandr3s commented 6 months ago

Please reopen if you see this issue again

pieper commented 6 months ago

Thanks @diazandr3s !