in all of those cases I expect us to report usage synopsis with some informative message instead of code tracebacks:
examples:
[x] no options specified whatsoever:
$> heudiconv
INFO: Running heudiconv version 0.4
Traceback (most recent call last):
File "/usr/bin/heudiconv", line 11, in <module>
load_entry_point('heudiconv==0.4', 'console_scripts', 'heudiconv')()
File "/usr/lib/python2.7/dist-packages/heudiconv/cli/run.py", line 120, in main
process_args(args)
File "/usr/lib/python2.7/dist-packages/heudiconv/cli/run.py", line 240, in process_args
heuristic = load_heuristic(args.heuristic)
File "/usr/lib/python2.7/dist-packages/heudiconv/utils.py", line 274, in load_heuristic
if os.path.sep in heuristic or os.path.lexists(heuristic):
TypeError: argument of type 'NoneType' is not iterable
[x] heuristic specified by no subject template or files:
$> heudiconv -f reproin
INFO: Running heudiconv version 0.4
Traceback (most recent call last):
File "/usr/bin/heudiconv", line 11, in <module>
load_entry_point('heudiconv==0.4', 'console_scripts', 'heudiconv')()
File "/usr/lib/python2.7/dist-packages/heudiconv/cli/run.py", line 120, in main
process_args(args)
File "/usr/lib/python2.7/dist-packages/heudiconv/cli/run.py", line 244, in process_args
args.subjs, grouping=args.grouping)
File "/usr/lib/python2.7/dist-packages/heudiconv/parser.py", line 155, in get_study_sessions
for f in files_opt:
TypeError: 'NoneType' object is not iterable
[ ] ls command should work also without heuristic specified:
$> heudiconv --command ls --files ~/picts/mris/dartmouth-phantoms/bids_test4-20161014/phantom-1/anat-angio_acq-fl3d
Traceback (most recent call last):
File "/usr/bin/heudiconv", line 11, in <module>
load_entry_point('heudiconv==0.4', 'console_scripts', 'heudiconv')()
File "/usr/lib/python2.7/dist-packages/heudiconv/cli/run.py", line 120, in main
process_args(args)
File "/usr/lib/python2.7/dist-packages/heudiconv/cli/run.py", line 230, in process_args
process_extra_commands(outdir, args)
File "/usr/lib/python2.7/dist-packages/heudiconv/cli/run.py", line 63, in process_extra_commands
heuristic = load_heuristic(args.heuristic)
File "/usr/lib/python2.7/dist-packages/heudiconv/utils.py", line 274, in load_heuristic
if os.path.sep in heuristic or os.path.lexists(heuristic):
TypeError: argument of type 'NoneType' is not iterable
in all of those cases I expect us to report usage synopsis with some informative message instead of code tracebacks:
examples: