FMRIPREP error: OSError: handle is closed

fmriprep
#1

Dear experts,

I am trying to run fmriprep-docker with the following command:

fmriprep-docker /Users/noelkuo/Desktop/Data/Nifti /Users/noelkuo/Desktop/Data/derivatives participant --participant-label NC080001 --fs-license-file /Users/noelkuo/freesurfer.txt

The following error message:

 [Node] Finished "fmriprep_wf.single_subject_ADNI0001_wf.func_preproc_task_rest_acq_multiband_wf.bold_mni_trans_wf.bold_reference_wf.enhance_and_skullstrip_bold_wf.apply_mask".
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/concurrent/futures/process.py", line 101, in _python_exit
    thread_wakeup.wakeup()
  File "/usr/local/miniconda/lib/python3.7/concurrent/futures/process.py", line 89, in wakeup
    self._writer.send_bytes(b"")
  File "/usr/local/miniconda/lib/python3.7/multiprocessing/connection.py", line 183, in send_bytes
    self._check_closed()
  File "/usr/local/miniconda/lib/python3.7/multiprocessing/connection.py", line 136, in _check_closed
    raise OSError("handle is closed")
OSError: handle is closed
Sentry is attempting to send 0 pending error messages
Waiting up to 2.0 seconds
Press Ctrl-C to quit

However, pre-processed data seems to have been completed

Any help would be greatly appreciated,
Noel

0 Likes

#2

Hi @Noel, could you post the full output log? I suspect that the error is generated right at the end of execution, after all the processing is done. If that is the case, I don’t think you’ll need to worry.

0 Likes

#3

Hi, Oscar
In sub-NC080001.html, there was no error detected.
I will try fmriprep again. Would I use the “–verbose” or “-vvv” ? Which output log could help u to check the error information?

0 Likes

#4

Hi @Noel, as far as processing goes, the last thing of consequence that fMRIPrep does is generate the reports, so if no errors have occurred up to that point, you’re fine. In this case, it appears that there is a problem with how we exit Python.

Note the Error in atexit._run_exitfuncs:. This means that it’s clean-up code. I’m not sure that there’s a good way for us to catch and prevent this output. If we can reproduce it, we can try to make sure that the multiprocessing engine is shut down correctly (though this may be a Python bug, and not actually something we can directly do anything about).

0 Likes

#5

Hi, @effigies @oesteban
I share the output log. I guess the error is generated at the end of execution, but still, need your help to check the logs.logs.txt (654.6 KB)
logs_detail.txt (2.4 MB)

0 Likes

#6

Hi @noel, these logs look fine.

1 Like

#7

Hi @effigies @oesteban ,
Thank you for your help and the explanation about the error.

0 Likes