Closed arokem closed 8 months ago
cc @RosieZho, @66RuixiZheng
Seems like the file is corrupt - I'd try clearing the local templateflow directory ($HOME/.cache/templateflow
) and redownload the data. You can use the following command, assuming you have templateflow installed in your current python environment.
python -c "import templateflow.api as tf; tf.get('MNI152NLin2009cAsym', resolution=1, desc=None, suffix='T1w')"
I tried invoking the command and it still doesn't work, but the following warning appears, ‘repository not found at <C:\Users\Administrator.cache\templateflow>. Populating a new TemplateFlow stub. If the path reported above is not the desired location for TemplateFlow, please set the TEMPLATEFLOW_HOME environment variable.’
Ah, I see you're on windows - you might want to check:
%userprofile%\.cache\templateflow
This should be the default location, but you can alter this by setting the TEMPLATEFLOW_HOME
environment variable to a custom path.
Is this still open? @rosiezho @66RuixiZheng @arokem
@RosieZho switched to a matlab version of AFQ so I assume templateflow is not used there.
@ZhengRuixi, did you resolve the issue?
Deleting the templateflow cache would be a first step to solve this.
@mgxd given the prevalence of this kind of issues when pulling from S3, we should probably check MD5 sums or try to open the file with nibabel after a download, don't you think?
I believe this is a duplicate of #53. Since my comment is sort of suggested there, let's move the conversation.
A pyAFQ user reported that they are seeing the following error:
"nibabel.filebasedimages.ImageFileError: File C:\Users\Leqing Zhou.cache\templateflow\tpl-MNI152NLin2009cAsym\tpl-MNI152NLin2009cAsym_res-01_T1w.nii.gz is not a gzip file"
What should they do to recover from this state of affairs?