Charestlab / pyGLMdenoise

python implementation of GLMdenoise
6 stars 6 forks source link

Display useful error message if no run entity / dataset does not have runs #60

Open JasperVanDenBosch opened 5 years ago

JasperVanDenBosch commented 5 years ago
Traceback (most recent call last):
  File "/home/jasper/Projects/pyGLMdenoise/env/bin/glmdenoise", line 11, in <module>
    load_entry_point('glmdenoise', 'console_scripts', 'glmdenoise')()
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/console.py", line 23, in main
    run_public(args.dataset, args.subject, args.task)
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/io/public.py", line 45, in run_public
    run_bids_directory(dataset_dir, sub=sub, task=task)
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/io/directory.py", line 22, in run_bids_directory
    return run_bids(bids, sub_num=sub_num, sub=sub, task=task)
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/io/directory.py", line 63, in run_bids
    run_bids(bids, sub=sub)
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/io/directory.py", line 55, in run_bids
    run_bids(bids, sub=sub, task=task)
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/io/directory.py", line 49, in run_bids
    run_bids(bids, sub=sub, task=task, ses=ses)
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/io/directory.py", line 45, in run_bids
    return run_bids_subset(bids, sub, task, ses)
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/io/directory.py", line 86, in run_bids_subset
    bold_files, event_files = bids.match_run_files(bold_files, event_files)
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/io/bids.py", line 125, in match_run_files
    runs_bold = [get_ents(f)['run'] for f in bold_files]
  File "/home/jasper/Projects/pyGLMdenoise/glmdenoise/io/bids.py", line 125, in <listcomp>
    runs_bold = [get_ents(f)['run'] for f in bold_files]
KeyError: 'run'