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

ImageFileError: Cannot work out file type of ...pial_left.gii.gz" #286

Open
YH2010 opened this issue May 26, 2022 · 1 comment
Open

ImageFileError: Cannot work out file type of ...pial_left.gii.gz" #286

YH2010 opened this issue May 26, 2022 · 1 comment

Comments

@YH2010
Copy link

YH2010 commented May 26, 2022

I want to get expression data based on destrieux atlas, but there is something wrong as follows:

My code:
`rom brainstat.context.genetics import surface_genetic_expression
from nilearn import datasets
import numpy as np
destrieux = datasets.fetch_atlas_surf_destrieux()
labels = np.hstack((destrieux['map_left'], destrieux['map_right']))
fsaverage = datasets.fetch_surf_fsaverage()
surfaces = (fsaverage['pial_left'], fsaverage['pial_right'])

expression = surface_genetic_expression(labels, surfaces, space='fsaverage')`

when running the codes of last line:

the error pop out as follows:
ImageFileError: Cannot work out file type of "D:\Program Files (x86)\anaconda3\envs\machinelearning\lib\site-packages\nilearn\datasets\data\fsaverage5\pial_left.gii.gz"

I check the files, both of them exist.

WIN10 OS

@ReinderVosDeWael
Copy link
Contributor

Hi,

Please try removing the file and downloading it anew; I suspect its corrupted.

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

2 participants