Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range #12

Open
giulia-berto opened this issue Apr 19, 2021 · 2 comments
Open

IndexError: list index out of range #12

giulia-berto opened this issue Apr 19, 2021 · 2 comments

Comments

@giulia-berto
Copy link

giulia-berto commented Apr 19, 2021

Hi, I'm trying to run the first-level analysis through docker/singularity after having run fMRIPrep on sub-10 of this dataset. The command I am running is the following:

singularity run \
    -B `pwd`/bids:/bids \
    -B `pwd`/${derdir}:/derivatives_dir \
    -B `pwd`/${outdir}:/output \
    -B `pwd`/${workdir}:/work \
    docker://poldracklab/ds003-example:0.0.3 \
    /derivatives_dir /output participant \
    --participant-label $sub \
    --work-dir work \
    --bids-dir /bids \
    --space MNI152NLin2009cAsym 

where output and work are two empty directories that I created. However, I get the following error:

INFO:    Using cached SIF image
Failed to import duecredit due to No module named 'duecredit'
/usr/local/miniconda/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/local/miniconda/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/local/miniconda/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/local/miniconda/lib/python3.7/site-packages/nilearn/datasets/neurovault.py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Container
Traceback (most recent call last):
  File "/src/run.py", line 180, in <module>
    sys.exit(main())
  File "/src/run.py", line 153, in main
    suffix='events', return_type='file', **subquery)[0]
IndexError: list index out of range

Any suggestions on how to handle this? Thank you!

EDIT: this happens both when running fMRIPrep by myself and when using the data already pre-processed found here: https://datasets.datalad.org/?dir=/labs/poldrack/ds003_fmriprep

@oesteban
Copy link
Collaborator

Hi @giulia-berto,

I'm very unclear about what could be the cause for this problem (pinging @rciric), but

  • at first it looks like the container image is a bit outdated - your error message complains about line 153 but the actual line is currently 163
    inputs[sub]['events'] = layout.get(
    suffix='events', return_type='file', **subquery)[0]
  • it seems that the image is complaining about missing events files - are they found under /bids ?

@giulia-berto
Copy link
Author

Hi @oesteban, yes, I do have the events in the bids folder under bids/sub-10/func/sub-10_task-rhymejudgment_events.tsv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants