Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error on Windows #7

Open
lassoan opened this issue Nov 2, 2024 · 2 comments
Open

Runtime error on Windows #7

lassoan opened this issue Nov 2, 2024 · 2 comments

Comments

@lassoan
Copy link

lassoan commented Nov 2, 2024

When trying to run the TotalSegmentator modle with latest Slicer Preview Release I get the following error:

[Python] Failed to compute results.
[Python] Command '['docker', 'run', '--rm', '--volume', 'C:/Users/andra/AppData/Local/Temp/Slicer/__SlicerTemp__2024-11-02_12+34+09.373:/app/data/input_data', '--volume', 'C:/Users/andra/AppData/Local/Temp/Slicer/__SlicerTemp__2024-11-02_12+34+09.374:/app/data/output_data', 'mhubai/totalsegmentator:latest', 'python3', '-m', 'mhubio.run', '--config', '/app/models/totalsegmentator/config/slicer.yml']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "C:/Users/andra/AppData/Local/slicer.org/Slicer 5.7.0-2024-11-01/slicer.org/Extensions-33087/MHubRunner/lib/Slicer-5.7/qt-scripted-modules/MRunner.py", line 432, in onApplyButton
    self.logic.process(
  File "C:/Users/andra/AppData/Local/slicer.org/Slicer 5.7.0-2024-11-01/slicer.org/Extensions-33087/MHubRunner/lib/Slicer-5.7/qt-scripted-modules/MRunner.py", line 891, in process
    self.runContainerSync(model, tmpDirIn, tmpDirOut, useGPU=useGPU)
  File "C:/Users/andra/AppData/Local/slicer.org/Slicer 5.7.0-2024-11-01/slicer.org/Extensions-33087/MHubRunner/lib/Slicer-5.7/qt-scripted-modules/MRunner.py", line 756, in runContainerSync
    self.logProcessOutput(proc)
  File "C:/Users/andra/AppData/Local/slicer.org/Slicer 5.7.0-2024-11-01/slicer.org/Extensions-33087/MHubRunner/lib/Slicer-5.7/qt-scripted-modules/MRunner.py", line 526, in logProcessOutput
    raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr)
subprocess.CalledProcessError: Command '['docker', 'run', '--rm', '--volume', 'C:/Users/andra/AppData/Local/Temp/Slicer/__SlicerTemp__2024-11-02_12+34+09.373:/app/data/input_data', '--volume', 'C:/Users/andra/AppData/Local/Temp/Slicer/__SlicerTemp__2024-11-02_12+34+09.374:/app/data/output_data', 'mhubai/totalsegmentator:latest', 'python3', '-m', 'mhubio.run', '--config', '/app/models/totalsegmentator/config/slicer.yml']' returned non-zero exit status 1.

Docker container log:

Processing started
�[95m**************************************************************�[0m
�[95m**                      CITATION NOTICE                     **�[0m
�[95m** -------------------------------------------------------- **�[0m
�[95m** �[0m                                                        �[95m **�[0m
�[95m** �[0mYou are running an MHub model. Cite the MHub platform in�[95m **�[0m
�[95m** �[0m your work. Visit https://mhub.ai/cite for more.        �[95m **�[0m
�[95m** �[0m                                                        �[95m **�[0m
�[95m** �[0mYou are running a model. Please cite the authors of the �[95m **�[0m
�[95m** �[0mmodel and the MHub model url in your work:              �[95m **�[0m
�[95m** �[0m The model card and run instructions for this model are �[95m **�[0m
�[95m** �[0m publicly available on the MHub platform under https://m�[95m **�[0m
�[95m** �[0m hub.ai/models/totalsegmentator.                        �[95m **�[0m
�[95m** �[0m                                                        �[95m **�[0m
�[95m** �[0mThank you for using MHub!                               �[95m **�[0m
�[95m** �[0m                                                        �[95m **�[0m
�[95m**************************************************************�[0m

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.8/dist-packages/mhubio/run.py", line 613, in <module>
    run(config_file)
  File "/usr/local/lib/python3.8/dist-packages/mhubio/run.py", line 374, in run
    config = Config(config_file=config_file, config=config_data)
  File "/usr/local/lib/python3.8/dist-packages/mhubio/core/Config.py", line 135, in __init__
    self._config = dict_merge(arg_config, self._config.copy())
AttributeError: 'NoneType' object has no attribute 'copy'

I get the same error when running the docker run command from command-line. This is the output:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.8/dist-packages/mhubio/run.py", line 613, in <module>
    run(config_file)
  File "/usr/local/lib/python3.8/dist-packages/mhubio/run.py", line 374, in run
    config = Config(config_file=config_file, config=config_data)
  File "/usr/local/lib/python3.8/dist-packages/mhubio/core/Config.py", line 135, in __init__
    self._config = dict_merge(arg_config, self._config.copy())
AttributeError: 'NoneType' object has no attribute 'copy'
**************************************************************
**                      CITATION NOTICE                     **
** -------------------------------------------------------- **
**                                                          **
** You are running an MHub model. Cite the MHub platform in **
**  your work. Visit https://mhub.ai/cite for more.         **
**                                                          **
** You are running a model. Please cite the authors of the  **
** model and the MHub model url in your work:               **
**  The model card and run instructions for this model are  **
**  publicly available on the MHub platform under https://m **
**  hub.ai/models/totalsegmentator.                         **
**                                                          **
** Thank you for using MHub!                                **
**                                                          **
**************************************************************

The error seems to be that self._config is None.

@LennyN95
Copy link
Member

LennyN95 commented Nov 5, 2024

Thank you @lassoan for sharing. I couldn't reproduce the issue on Mac or Linux but I have a guess what could happen here and am looking into it. Meanwhile, have you tired any other model?

@lassoan
Copy link
Author

lassoan commented Nov 5, 2024

Yes, all other models that I've tried fail with the exact same error. I've tried with TotalSegmentator, BAMF CT Kidney Seg, and CaSuSt so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants