Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
debinz opened this issue Feb 7, 2023 · 9 comments
Open

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

debinz opened this issue Feb 7, 2023 · 9 comments

Comments

@debinz
Copy link

debinz commented Feb 7, 2023

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
Copy link
Author

debinz commented Feb 7, 2023

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
Copy link

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
Copy link

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
Copy link

blahner commented Nov 3, 2023

@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
Copy link

@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
Copy link

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
Copy link

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
Copy link

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.

@daviddaubner42
Copy link

daviddaubner42 commented Dec 8, 2024

Hi all,

I can confirm that @lijin-coder 's solution worked for me. Here's a brief guide for anyone still having this issue:

  1. Find where ciftify was installed on your system (e.g. by running pip show ciftify)
  2. Search through all the files in the ciftify folder and remove all the import nibabel.gifti.giftiio statements and replace all instances of nibabel.gifti.giftiio.read( with nib.load(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants