Templateflow: error loading map


I’m using nilearn on a Windows computer. I’m trying to get an MNI atlas using Templateflow, this is my code:

atlas_file = get('MNI152NLin2009cAsym', resolution=2, atlas='HOSPA', desc='th25'); atlas = nb.load(atlas_file).get_data()

But I get the following error:

ImageFileError: Cannot work out file type of “C:/Users/maxab/.cache/templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_atlas-HOSPA_desc-th25_dseg.nii.gz”

I tried using: atlas = nb.Nifti1Image.from_filename(atlas_file)

But that also doesn’t work. I somehow haven’t found a way to fix this. Any leads?



Very likely the file is empty. I would try deleting it and retrying.

Thanks for your reply! :slight_smile:
It didn’t work for me, I tried different ways of solving the issue but ultimately chose a different provider.

Thanks anyway :slight_smile: