aces / Loris-MRI

The set of scripts that preprocess and insert MRI data into the database.
10 stars 50 forks source link

Push to S3 pipeline script - better handle options provided to the script #959

Closed cmadjar closed 1 year ago

cmadjar commented 1 year ago
$ run_push_imaging_files_to_s3_pipeline.py -p database_config_25.py
Traceback (most recent call last):
  File "/opt/loris/bin/mri/python/run_push_imaging_files_to_s3_pipeline.py", line 65, in <module>
    main()
  File "/opt/loris/bin/mri/python/run_push_imaging_files_to_s3_pipeline.py", line 61, in main
    PushImagingFilesToS3Pipeline(loris_getopt_obj, os.path.basename(__file__[:-3]))
  File "/opt/loris/bin/mri/python/lib/dcm2bids_imaging_pipeline_lib/push_imaging_files_to_s3_pipeline.py", line 31, in __init__
    super().__init__(loris_getopt_obj, script_name)
  File "/opt/loris/bin/mri/python/lib/dcm2bids_imaging_pipeline_lib/base_pipeline.py", line 89, in __init__
    self.load_imaging_upload_and_tarchive_dictionaries()
  File "/opt/loris/bin/mri/python/lib/dcm2bids_imaging_pipeline_lib/base_pipeline.py", line 162, in load_imaging_upload_and_tarchive_dictionaries
    if not success and not self.options_dict["force"]["value"]:
KeyError: 'force'

Need to handle:

cmadjar commented 1 year ago

Fixed in 24.1-release branch and will be released with 24.1.11. Once 24.1.11 is released, will pull the changes into main so that those fixes are in 25