Skip to content

Error ouput on commandline parsing not always explicit #170

@JanWP

Description

@JanWP

Example of failing command

pyhrf_jde_vem_analysis -o Processed_EVENT_cos_hp1e5-d 1.25 --drifts-type cos --hrf-hyperprior 100000 2.5 ../Masks/stanford_willard_parcellation.nii Paradigm/paradigm_events_session-2.csv Preprocessed/EVENT.nii

Note: option argument "-d" not separated from output directory. Command line is parsed without error and pyhrf crashes.

Output produced:

~/.local/bin/pyhrf_jde_vem_analysis:60: RuntimeWarning: divide by zero encountered in divide possible_dts = args.tr/np.arange(int(args.tr)-1, int(args.tr)+2) Traceback (most recent call last): File "~/.local/bin/pyhrf_jde_vem_analysis", line 186, in <module> main(parser_args) File "~/.local/bin/pyhrf_jde_vem_analysis", line 84, in main bold_files=args.bold_data_file, tr=args.tr File "~/.local/lib/python2.7/site-packages/pyhrf/tools/misc.py", line 52, in __call__ return self.fn(self.cls, *args, **kwargs) File "~/.local/lib/python2.7/site-packages/pyhrf/core.py", line 704, in from_vol_files delim=paradigm_csv_delim) File "~/.local/lib/python2.7/site-packages/pyhrf/paradigm.py", line 512, in from_csv onsets, durations = load_paradigm_from_csv(csvFile, delim) File "~/.local/lib/python2.7/site-packages/pyhrf/tools/_io/_io.py", line 460, in load_paradigm_from_csv for row in reader: _csv.Error: line contains NULL byte

Expected behavior:
Command line parsing error or output by phyrf pointing the problem encountered with the command line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions