Hendrik-code / spineps

This is a segmentation pipeline to automatically, and robustly, segment the whole spine in T2w sagittal images.
Apache License 2.0
8 stars 1 forks source link

Name mismatch between variables #5

Closed NathanMolinier closed 4 months ago

NathanMolinier commented 4 months ago

Hey ! First of all, congratulation for your work, your results are impressive ! Also, I'm trying to run your code on a BIDS dataset but I encountered an error:

[Models] Check available models...
[122_T2w_sag_1.0] Model loaded from /home/GRAMES.POLYMTL.CA/p118739/data_nvme_p118739/code/spineps/spineps/models/T2w_Segmentor
[Instance_Vertebra_1.0] Model loaded from /home/GRAMES.POLYMTL.CA/p118739/data_nvme_p118739/code/spineps/spineps/models/Inst_Vertebra
Traceback (most recent call last):
  File "/home/GRAMES.POLYMTL.CA/p118739/.conda/envs/spineps_env/bin/spineps", line 8, in <module>
    sys.exit(entry_point())
             ^^^^^^^^^^^^^
  File "/home/GRAMES.POLYMTL.CA/p118739/data_nvme_p118739/code/spineps/spineps/utils/citation_reminder.py", line 21, in wrapper
    func_result = func(*args, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/home/GRAMES.POLYMTL.CA/p118739/data_nvme_p118739/code/spineps/spineps/entrypoint.py", line 168, in entry_point
    run_dataset(opt)
  File "/home/GRAMES.POLYMTL.CA/p118739/data_nvme_p118739/code/spineps/spineps/utils/citation_reminder.py", line 21, in wrapper
    func_result = func(*args, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/home/GRAMES.POLYMTL.CA/p118739/data_nvme_p118739/code/spineps/spineps/entrypoint.py", line 268, in run_dataset
    "rawdata_name": opt.rawdata_name,
                    ^^^^^^^^^^^^^^^^
AttributeError: 'Namespace' object has no attribute 'rawdata_name'

I fixed it on my side, it is just a name mismatch between 2 variables, see: https://github.com/Hendrik-code/spineps/blob/48734669d069d8365106b1bb66030723448bab66/spineps/entrypoint.py#L119 and https://github.com/Hendrik-code/spineps/blob/48734669d069d8365106b1bb66030723448bab66/spineps/entrypoint.py#L268

I tried to push a branch but since I have no rights I just created this issue. Thanks !

Hendrik-code commented 4 months ago

Hey

Can you create a merge request for this? Then I will merge it.

Hendrik-code commented 4 months ago

Fixed it in the main