Fmriprep python error apply mask


I am running into an error using the singularity version 1.4.1 of fmriprep. It always fails at this step: Finished “fmriprep_wf.single_subject_M80320923_wf.func_preproc_task_adultfaces_wf.bold_std_trans_wf.bold_reference_wf.enhance_and_skullstrip_bold_wf.apply_mask”.

Any ideas? Below is the full error message. And I am unsetting the python path and ussing ‘–cleanenv’. Thanks!

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.7/concurrent/futures/”, line 101, in _python_exit
File “/usr/local/miniconda/lib/python3.7/concurrent/futures/”, line 89, in wakeup
File “/usr/local/miniconda/lib/python3.7/multiprocessing/”, line 183, in send_bytes
File “/usr/local/miniconda/lib/python3.7/multiprocessing/”, line 136, in _check_closed
raise OSError(“handle is closed”)
OSError: handle is closed

Hi, that’s actually just a bug in the Python interpreter shutting down, after fMRIPrep is done. If there are no errors listed in your reports, fMRIPrep finished successfully.


Thanks for your help! I am wondering why in my functional report I am not seeing the carpet plots (and fd and dvars). Here is the command I am using: unset PYTHONPATH; singularity run --cleanenv /home/adufford/singularity_images/fmriprep-1.4.1.simg /home/adufford/RISE_fmriprep/bids_root/ /home/adufford/RISE_fmriprep/out/ participant --fs-license-file /home/adufford/RISE_fmriprep/license.txt --fd-spike-threshold 0.3 --fs-no-reconall --output-spaces MNIInfant:res-1:cohort-1


I believe these missing plots are a result of using a different template space. We have an open issue (GitHub #1119) to get these up for any template space. To get a sense of them regardless, you can add MNI152NLin2009cAsym to your output spaces, though this will add time and consume more disk space.

Awesome! That makes sense! Thanks for your help.