edickie / ciftify

The tools of the Human Connectome Project (HCP) adapted for working with non-HCP datasets
https://edickie.github.io/ciftify/
MIT License
116 stars 157 forks source link

ModuleNotFoundError: No module named 'nibabel.gifti.giftiio' #181

Open debinz opened 1 year ago

debinz commented 1 year ago

Hi there,

Many thanks for developing this awesome tool. I hope to use this tool to temporal filter my cifti fMRI data, but I found it cannot find the module 'nibabel.gifti.giftiio'. I checked the API info of nibabel (v 5.0.0) on this page: https://nipy.org/nibabel/reference/nibabel.gifti.html, and also did not find this module. Does this tool depend on an older version of nibabel? Can you please provide me with some suggestions to deal with this issue? Thank you very much.

Best regards, Debin

debinz commented 1 year ago

Because I tried a .dtseries.nii file, I commented this import line out. However, I still encountered a new error: File PathtothePackage/ciftify/bin/ciftify_clean_img.py, line345, in clean_image_with_nilearn confounds=cofound_signals.values AttributeError: 'NoneType' object has no attribute 'values'

and I found the cofound_signals returned by the mangle_confounds function indeed does not have this attribute. Can you please provide me with some suggestions to deal with this issue? Thank you very much.

Debin

oliver-xie commented 1 year ago

Yes, you need an older version of nibabel such as version 3.2.0. The giftiio has been deprecated. See its changelog. https://github.com/nipy/nibabel/blob/504776c504fc8803d15fb444dd077ec91ec4f54d/Changelog

Hi there,

Many thanks for developing this awesome tool. I hope to use this tool to temporal filter my cifti fMRI data, but I found it cannot find the module 'nibabel.gifti.giftiio'. I checked the API info of nibabel (v 5.0.0) on this page: https://nipy.org/nibabel/reference/nibabel.gifti.html, and also did not find this module. Does this tool depend on an older version of nibabel? Can you please provide me with some suggestions to deal with this issue? Thank you very much.

Best regards, Debin

tiborauer commented 1 year ago

Hi, I have the same issue and tried downgrading nibabel to 3.2.0. Then, the nibabel became incompatible with numpy >=1.20 due to type aliases. I tried downgrading numpy but it failed due to other dependencies. I tried both Python 3.8 and 3.9.

Can you provide a working set of requirements?

blahner commented 1 year ago

@tiborauer , have you found a solution? I am running into the same issue with nibabel and then numpy incompatibilities. My environment is using the requirements.txt file given in ./cifitify/ciftify_requirements.txt. A working set of requirements would be great. Thanks!

neurodenizen commented 11 months ago

@edickie Thank you very much for this tool! Unfortunately I am running into the same issue mentioned in this thread. Is there a working set of package requirements by any chance? Thanks.

lijin-coder commented 10 months ago

Hi, @neurodenizen I had the same issue about "nibabel.gifti.giftiio". But I found this package of an older version containing only two function about reading and writing gifti file. So I change the functions of a new version and it works. import nibabel as nib gft = nib.load(giftiname) gft = nib.save(giftiname, 'new_image.nii.gz')

I hope it can help you.

vpokorny123 commented 4 months ago

I am also having this problem. On first read the solution posted by @lijin-coder isn't making a lot of sense to me...

tiborauer commented 4 months ago

Hi all,

Due to the lack of support/development, I decided on another solution based on FreeSurfer and niworkflow. You can check out my implementation in reproanalysis extension.