PennLINC / fw-heudiconv

Heuristic-based Data Curation on Flywheel
BSD 3-Clause "New" or "Revised" License
6 stars 11 forks source link

[BUG] Better error message when project does not exist #19

Closed mattcieslak closed 5 years ago

mattcieslak commented 5 years ago

If you typo the project name and it doesn't find anything the error message is:

Traceback (most recent call last):
  File "/Users/mcieslak/miniconda3/envs/qsiprep/bin/fw-heudiconv-curate", line 11, in <module>
    load_entry_point('fw-heudiconv', 'console_scripts', 'fw-heudiconv-curate')()
  File "/Users/mcieslak/projects/upenn/flywheel/fw-heudiconv/fw_heudiconv/cli/curate.py", line 163, in main
    dry_run=args.dry_run)
  File "/Users/mcieslak/projects/upenn/flywheel/fw-heudiconv/fw_heudiconv/cli/curate.py", line 51, in convert_to_bids
    logger.debug('Found project: %s (%s)', project_obj['label'], project_obj.id, )
TypeError: 'NoneType' object is not subscriptable