Issue with fMRIPrep 24.1.0 Crashing During Templateflow Download

Summary of what happened:

Hi everyone,

I’m trying to run fMRIPrep 24.1.0, but it keeps crashing while attempting to install the file tpl-fsLR_hemi-L_den-32k_sphere.surf.gii from TemplateFlow. Below is a snippet from the stack trace.
It looks like the connection to TemplateFlow times out while trying to download the necessary template file. Has anyone experienced this before? Is there a way to increase the maximum time before timeout, or another workaround for this issue?

Thanks in advance!

Command used (and if a helper script was used, a link to the helper script or the command generated):

PUT COMMAND HERE

Version:

24.1.0

Environment (Docker, Singularity / Apptainer, custom installation):

Data formatted according to a validatable standard? Please provide the output of the validator:

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

2024-09-25 10:33:02,865 [    INFO] ANAT Stage 10: Creating MSM-Sulc registration sphere
Downloading https://templateflow.s3.amazonaws.com/tpl-fsLR/tpl-fsLR_hemi-L_den-32k_sphere.surf.gii
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/urllib3/connectionpool.py", line 466, in _make_request
    self._validate_conn(conn)
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1095, in _validate_conn
    conn.connect()
  ...
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='templateflow.s3.amazonaws.com', port=443): Read timed out. (read timeout=10)
srun: error: r440-14: task 0: Exited with exit code 1

Screenshots / relevant information:


Hi @swwalsh1,

Does your cluster have internet access? Have other templateflow or related internet access requests failed? If no internet, you can download the templateflow directory and relevant files with datalad, and then direct fmriprep to this folder by setting the TEMPLATEFLOW_HOME environment variable (you did not say if you are using Docker or Singularity, which have different ways of setting environment variables).

Best,
Steven

Hi Steven,

I found this was due to a firewall on my institution’s cluster. Thanks for pointing me towards the possibility of network issues on the cluster.

Best,
Shane