Skip to content

catch mis-spellings of session name #37

@jdkent

Description

@jdkent

attribute error is raised in line 518

Traceback (most recent call last):
  File "/usr/local/miniconda/bin/xnat_downloader", line 11, in <module>
    load_entry_point('xnat-downloader==0.1', 'console_scripts', 'xnat_downloader')()
  File "/usr/local/miniconda/lib/python2.7/site-packages/xnat_downloader-0.1-py2.7.egg/xnat_downloader/cli/run.py", line 667, in main
    overwrite_nii=opts.overwrite_nii)
  File "/usr/local/miniconda/lib/python2.7/site-packages/xnat_downloader-0.1-py2.7.egg/xnat_downloader/cli/run.py", line 518, in download_scan
    sub_name, ses_name = re.search(sub_ses_pattern, ses_dir).groups()
AttributeError: 'NoneType' object has no attribute 'groups'

I should catch and handle this case better, perhaps by writing to a log and then continuing along with processing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions