Hello,
I used fMRIPrep to pre-process task-based data, and am now attempting to do a 1st level analysis based on the container / code found here: https://github.com/poldracklab/ds003-post-fMRIPrep-analysis
I create the image by building a docker image locally (on Windows) then directly pulling it with singularity.
I execute the following commands (which use the container):
export TEMPLATEFLOW_HOME=/home/username/.cache/templateflow
singularity run \
--cleanenv \
-B ${tpflow}:/opt/templateflow \
-B ${bids_root}:/bids_dir \
-B ${output}:/out \
${images}/<container>.sif \
${derivatives} ${out} \
participant \
--participant-label $SUBJECT \
--bids-dir /bids_dir \
--ncpus 12 \
-w ${intermediate}
And get an error:
Failed to import duecredit due to No module named 'duecredit'
Traceback (most recent call last):
File "/src/run.py", line 6, in <module>
from templateflow.api import get as tpl_get, templates as get_tpl_list
File "/usr/local/miniconda/lib/python3.7/site-packages/templateflow/__init__.py", line 19, in <module>
from . import api
File "/usr/local/miniconda/lib/python3.7/site-packages/templateflow/api.py", line 7, in <module>
from .conf import TF_LAYOUT, TF_S3_ROOT, TF_USE_DATALAD
File "/usr/local/miniconda/lib/python3.7/site-packages/templateflow/conf/__init__.py", line 92, in <module>
"scripts",
File "/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/layout.py", line 188, in __init__
**kwargs)
TypeError: __init__() got an unexpected keyword argument 'ignore'
Is this a versioning issue? Based on the error cited below, it seems like the code/container might have more versioning issues? Any guidance would be much appreciated!!
note - this is similar to a previous (unresolved) comment found in this post: https://neurostars.org/t/nipype-second-level-analysis-with-fsl-interface/4659
As an aside, upon attempting to remove the templateflow import statement in run.py, I also got this error:
/usr/local/miniconda/lib/python3.7/site-packages/nipype/workflows/__init__.py:28: UserWarning: Nipype 1 workflows have been moved to the niflow-nipype1-workflows package. pip install niflow-nipype1-workflows to continue using them.
warnings.warn(" ".join(_msg))
Traceback (most recent call last):
File "/src/run.py", line 192, in <module>
sys.exit(main())
File "/src/run.py", line 135, in main
from workflows import first_level_wf
File "/src/workflows.py", line 8, in <module>
from nipype.workflows.fmri.fsl.preprocess import create_susan_smooth
ModuleNotFoundError: No module named 'nipype.workflows.fmri'
but was able to resolve it by adding niflow-nipype1-workflows to the requirements.txt file. The first cited error pops up later on regardless.
Thank you,
Eli