Skip to content

Compatibility with nibabel 4.0.0 #3486

Closed
@HippocampusGirl

Description

@HippocampusGirl

Actual behavior

nipype uses the now removed nibabel.trackvis interface, which leads to a ModuleNotFoundError.

from nibabel.trackvis import HeaderError

│     ---- (full traceback above) ----
│     File "/usr/local/miniconda/lib/python3.10/site-packages/fmriprep/cli/workflow.py", line 82, in build_workflow
│         retval["workflow"] = init_fmriprep_wf()
│     File "/usr/local/miniconda/lib/python3.10/site-packages/fmriprep/workflows/base.py", line 64, in init_fmriprep_wf
│         single_subject_wf = init_single_subject_wf(subject_id)
│     File "/usr/local/miniconda/lib/python3.10/site-packages/fmriprep/workflows/base.py", line 304, in init_single_subject_wf
│         func_preproc_wf = init_func_preproc_wf(bold_file)
│     File "/usr/local/miniconda/lib/python3.10/site-packages/fmriprep/workflows/bold/base.py", line 419, in init_func_preproc_wf
│         bold_sdc_wf = init_sdc_estimate_wf(fmaps, metadata,
│     File "/usr/local/miniconda/lib/python3.10/site-packages/sdcflows/workflows/base.py", line 154, in init_sdc_estimate_wf
│         from .fmap import init_fmap2field_wf
│     File "/usr/local/miniconda/lib/python3.10/site-packages/sdcflows/workflows/fmap.py", line 29, in <module>
│         from .gre import init_fmap_postproc_wf, init_magnitude_wf
│     File "/usr/local/miniconda/lib/python3.10/site-packages/sdcflows/workflows/gre.py", line 17, in <module>
│         from niflow.nipype1.workflows.dmri.fsl.utils import cleanup_edge_pipeline
│     File "/usr/local/miniconda/lib/python3.10/site-packages/niflow/nipype1/workflows/dmri/__init__.py", line 4, in <module>
│         from . import camino, mrtrix, fsl, dipy
│     File "/usr/local/miniconda/lib/python3.10/site-packages/niflow/nipype1/workflows/dmri/mrtrix/__init__.py", line 3, in <module>
│         from .diffusion import create_mrtrix_dti_pipeline
│     File "/usr/local/miniconda/lib/python3.10/site-packages/niflow/nipype1/workflows/dmri/mrtrix/diffusion.py", line 5, in <module>
│         from nipype.interfaces import mrtrix as mrtrix
│     File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/interfaces/mrtrix/__init__.py", line 36, in <module>
│         from .convert import MRTrix2TrackVis
│     File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/interfaces/mrtrix/convert.py", line 6, in <module>
│         import nibabel.trackvis as trk
└─    ModuleNotFoundError: No module named 'nibabel.trackvis'

Expected behavior

There should not be an error.

My suggestions

  • Update the requirements.txt to indicate a lack of compatibility with nibabel 4.0.0,

nibabel>=2.1.0

  • Find out where the removed interfaces were used, and replace them.

How to replicate the behavior

I'm skipping this for now, because I think the issue is obvious from the code. If I'm mistaken, please let me know and I will edit to add some steps.

Script/Workflow details

This happens when using fMRIPrep LTS with HALFpipe.

Platform details:

I am skipping this for now, since I believe the issue is unrelated to my platform. Please let me know if you require this information.

Execution environment

Container downloaded from https://download.fmri.science/singularity/halfpipe-halfpipe-latest.sif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions