Skip to content

Pybids index_metadata error on singularity #345

@csiyer

Description

@csiyer

Describe the bug
I am trying to run nibs v0.6.0 on the outputs of an fmriprep dataset via singularity on an HPC. When I do so, I receive this error:

Traceback (most recent call last):
File "/opt/miniconda-latest/bin/nibs", line 8, in
sys.exit(main())
File "/opt/miniconda-latest/lib/python3.7/site-packages/nibetaseries/cli/run.py", line 282, in main
work_dir=work_dir,
File "/opt/miniconda-latest/lib/python3.7/site-packages/nibetaseries/workflows/base.py", line 150, in init_nibetaseries_participant_wf
indexer.index_metadata(**metadata_filter)
TypeError: 'bool' object is not callable

Looking at the source code, it looks like the BIDSLayoutIndexerPatch class from workflows/utils.py inherits an attribute index_metadata=True from its parent class, BIDSLayoutIndexer (from Pybids: https://bids-standard.github.io/pybids/_modules/bids/layout/index.html). The pybids version in the singularity download is 0.15.6. There are other issues too (it assumes a self.layout attribute when I believe pybids has self._layout). I'm not sure if this is solvable with changes to my dataset structure, changing the pybids version (I tried 0.13.2 and it didn't work either), or something else.

To Reproduce
Maybe there is some particularity about my dataset structure that makes this not reproducible. But I (1) built the singularity image from v0.6.0, ran with this command:

singularity run --cleanenv
-B /hybrid_mri_bids:/bids_dir
-B /hybrid_mri_bids/derivatives:/out_dir
-B /work:/work_dir
/mri_utils/nibetaseries-0.6.0.simg
nibs
--work-dir /work_dir
--estimator lss
--high-pass 0.008
--hrf-model glover
--confounds trans_x trans_y trans_z rot_x rot_z rot_z
trans_x_derivative1 trans_y_derivative1 trans_z_derivative1 rot_x_derivative1 rot_y_derivative1 rot_z_derivative1
trans_x_power2 trans_y_power2 trans_z_power2 rot_x_power2 rot_y_power2 rot_z_power2
trans_x_derivative1_power2 trans_y_derivative1_power2 trans_z_derivative1_power2 rot_x_derivative1_power2 rot_y_derivative1_power2 rot_z_derivative1_power2
--participant-label $SUBJECT_ID
--description-label preproc_bold
--space-label MNI152NLin2009cAsym
--nthreads 8
/bids_dir
fmriprep
/out_dir
participant  

Expected behavior
Nibs crashed after ~10 seconds and provided the error above (TypeError: 'bool' object is not callable).

Desktop (please complete the following information):
Linux on HPC

nibetaseries version
0.6.0

Additional context
I previously had some issues with just getting pybids to recognize my dataset structure, so it is possible I have a personal problem. But from everything I can tell in the source code, nibs and pybids in the versions within the singularity image won't work together correctly....I would be happy to be mistaken! Thanks!

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