mriqc icon indicating copy to clipboard operation
mriqc copied to clipboard

DWI bids compliant but MRIQC cannot process

Open dkp opened this issue 8 months ago • 13 comments

What happened?

I'm trying MRIQC on 50 subjects on the HPC using apptainer. Most subjects run fine for all three modalities at once: T1w, bold, dwi. However, some crashed.
To investigate, I ran a subject with -m T1w bold This ran fine and produced reports for those 2 modalities. Then I ran with -m dwi and this one crashed. See log below.

What command did you use?

apptainer run --cleanenv --bind ${DATA}:/data:ro --bind ${APP_DERIV_DIR}:/outputs ${APP} \
/data /outputs participant --participant_label ${Subject} -m dwi -w ${WORK_DIR} --verbose-reports

What version of the software are you running?

Running MRIQC version 24.1.0.dev0+g3fe90466.d20240417

How are you running this software?

Singularity

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

$ sbatch --export sub=083 runmriqc_dev.sh
Submitted batch job 1968242
$ cat slurm-1968242.out 
/xdisk/eplante/dkp/plante/data should contain dataset_description.json!
------------------------------------------------------------------
  Running MRIQC version 24.1.0.dev0+g3fe90466.d20240417
  ----------------------------------------------------------------
  * BIDS dataset path: /data.
  * Output folder: /outputs.
  * Analysis levels: ['participant'].
------------------------------------------------------------------

2024-06-01 13:19:07 | IMPORTANT | mriqc            | Building MRIQC's workflows...
2024-06-01 13:19:17 | IMPORTANT | mriqc            | Workflow building finished (exit code 0).
2024-06-01 13:19:25 | WARNING  | mriqc            | IMPORTANT: Anonymized quality metrics (IQMs) will be submitted to MRIQC's metrics repository. Submission of IQMs can be disabled using the ``--no-sub`` argument. Please visit https://mriqc.readthedocs.io/en/latest/dsa.html to revise MRIQC's Data Sharing Agreement.
2024-06-01 13:19:56 | WARNING  | nipype.workflow  | Storing result file without outputs
2024-06-01 13:19:56 | WARNING  | nipype.workflow  | [Node] Error on "mriqc_wf.dwiMRIQC.ComputeIQMs.datasink" (/xdisk/eplante/dkp/plante/mriqc_work_dev/mriqc_wf/dwiMRIQC/ComputeIQMs/_in_file_..data..sub-083..dwi..sub-083_acq-AP_dwi.nii.gz/datasink)
Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/site-packages/mriqc/engine/plugin.py", line 579, in _send_procs_to_workers
    self.procs[jobid].run(updatehash=updatehash)
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node datasink.

Traceback:
        Traceback (most recent call last):
          File "/opt/conda/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 397, in run
            runtime = self._run_interface(runtime)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/opt/conda/lib/python3.11/site-packages/mriqc/interfaces/bids.py", line 188, in _run_interface
            json.dumps(
          File "/opt/conda/lib/python3.11/site-packages/simplejson/__init__.py", line 395, in dumps
            **kw).encode(obj)
                  ^^^^^^^^^^^
          File "/opt/conda/lib/python3.11/site-packages/simplejson/encoder.py", line 300, in encode
            chunks = list(chunks)
                     ^^^^^^^^^^^^
          File "/opt/conda/lib/python3.11/site-packages/simplejson/encoder.py", line 714, in _iterencode
            for chunk in _iterencode_dict(o, _current_indent_level):
          File "/opt/conda/lib/python3.11/site-packages/simplejson/encoder.py", line 645, in _iterencode_dict
            yield _floatstr(value)
                  ^^^^^^^^^^^^^^^^
          File "/opt/conda/lib/python3.11/site-packages/simplejson/encoder.py", line 351, in floatstr
            raise ValueError(
        ValueError: Out of range float values are not JSON compliant: nan


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/bin/mriqc", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/mriqc/cli/run.py", line 178, in main
    mriqc_wf.run(**_plugin)
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/workflows.py", line 638, in run
    runner.run(execgraph, updatehash=updatehash, config=self.config)
  File "/opt/conda/lib/python3.11/site-packages/mriqc/engine/plugin.py", line 214, in run
    self._send_procs_to_workers(updatehash=updatehash, graph=graph)
  File "/opt/conda/lib/python3.11/site-packages/mriqc/engine/plugin.py", line 582, in _send_procs_to_workers
    self._clean_queue(
  File "/opt/conda/lib/python3.11/site-packages/mriqc/engine/plugin.py", line 259, in _clean_queue
    raise RuntimeError(''.join(result['traceback']))
RuntimeError: Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/site-packages/mriqc/engine/plugin.py", line 579, in _send_procs_to_workers
    self.procs[jobid].run(updatehash=updatehash)
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node datasink.

Traceback:
        Traceback (most recent call last):
          File "/opt/conda/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 397, in run
            runtime = self._run_interface(runtime)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/opt/conda/lib/python3.11/site-packages/mriqc/interfaces/bids.py", line 188, in _run_interface
            json.dumps(
          File "/opt/conda/lib/python3.11/site-packages/simplejson/__init__.py", line 395, in dumps
            **kw).encode(obj)
                  ^^^^^^^^^^^
          File "/opt/conda/lib/python3.11/site-packages/simplejson/encoder.py", line 300, in encode
            chunks = list(chunks)
                     ^^^^^^^^^^^^
          File "/opt/conda/lib/python3.11/site-packages/simplejson/encoder.py", line 714, in _iterencode
            for chunk in _iterencode_dict(o, _current_indent_level):
          File "/opt/conda/lib/python3.11/site-packages/simplejson/encoder.py", line 645, in _iterencode_dict
            yield _floatstr(value)
                  ^^^^^^^^^^^^^^^^
          File "/opt/conda/lib/python3.11/site-packages/simplejson/encoder.py", line 351, in floatstr
            raise ValueError(
        ValueError: Out of range float values are not JSON compliant: nan

Additional information / screenshots

No response

dkp avatar Jun 01 '24 20:06 dkp