You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Downloading file 'hf_sef_evoked.tar.gz' from 'https://zenodo.org/record/3523071/files/hf_sef_evoked.tar.gz' to '/home/circleci/mne_data'.
100%|███████████████████████████████████████| 766M/766M [00:00<00:00, 3.35TB/s]
Extracting 'hf_sef/MEG' from '/home/circleci/mne_data/hf_sef_evoked.tar.gz' to '/home/circleci/mne_data'
Traceback (most recent call last):
File "/home/circleci/.local/lib/python3.8/site-packages/pooch/processors.py", line 219, in _extract_file
output.write(data_file.read())
AttributeError: 'NoneType' object has no attribute 'read'
$ python -c "import mne; mne.datasets.hf_sef.data_path(force_update=True, verbose=True)"
Using default location ~/mne_data for HF_SEF...
Downloading file 'hf_sef_evoked.tar.gz' from 'https://zenodo.org/record/3523071/files/hf_sef_evoked.tar.gz' to '/Users/larsoner/mne_data'.
100%|███████████████████████████████████████| 766M/766M [00:00<00:00, 1.79TB/s]
Extracting 'hf_sef/MEG' from '/Users/larsoner/mne_data/hf_sef_evoked.tar.gz' to '/Users/larsoner/mne_data'
Traceback (most recent call last):
File "/Users/larsoner/opt/miniconda3/lib/python3.8/site-packages/pooch/processors.py", line 219, in _extract_file
output.write(data_file.read())
AttributeError: 'NoneType' object has no attribute 'read'
Confirmed able to reproduce error locally, but not sure why the CI works on: #9763 then?
Datasets are only downloaded if needed. CircleCI caches invalidate at different times for different datasets. So my guess is that it was always broken since #9742 went in, but us noticing it was just delayed until an actual download had to happen (in this case, because some CircleCI cache expired, and then it went to download, and it failed).
So I'm able to fix it by changing hf_sef pooch processor to just
Untar(path)
From originally:
Untar(path, members=...)
Idk if we need fine grained extraction of the dataset based on the MEG, subjects and SSS directory right? We want all 3 subdirectories so this should be a safe change?
Seems weird and might be a bug on pooch end imo so I can file an upstream issue later.
To check if that fix is correct at our end, can you try downloading the dataset before #9742, examine the contents, delete the directory, download it with #9742 plus your proposed fix, and make sure the contents are the same (i.e., same set of files)? We don't want to include a bunch of extra junk that's in there (if it's in there), I wonder if that's why we wanted a members=...
So the issue with HF_SEF vs hf_sef seems to be that the folder in the tar file is hf_sef, but our desired folder_name is actually HF_SEF. That is probably the reason for these LOC: #9742 (comment)
Agreed I would just rename. Although really maybe we can live with hf_sef being the new name rather than fight with it. I don't think that dataset is downloaded super often...
Maybe just fix the names = [params['dataset_name'] for params in dataset_params] bug and then we'll merge #9763?
Activity
adam2392 commentedon Sep 22, 2021
Confirmed able to reproduce error locally, but not sure why the CI works on: #9763 then?
Looking into why pooch is even raising the error because it seemed to work w/ our unit tests...
larsoner commentedon Sep 22, 2021
Datasets are only downloaded if needed. CircleCI caches invalidate at different times for different datasets. So my guess is that it was always broken since #9742 went in, but us noticing it was just delayed until an actual download had to happen (in this case, because some CircleCI cache expired, and then it went to download, and it failed).
adam2392 commentedon Sep 22, 2021
So I'm able to fix it by changing hf_sef pooch processor to just
Untar(path)
From originally:
Untar(path, members=...)
Idk if we need fine grained extraction of the dataset based on the MEG, subjects and SSS directory right? We want all 3 subdirectories so this should be a safe change?
Seems weird and might be a bug on pooch end imo so I can file an upstream issue later.
larsoner commentedon Sep 22, 2021
To check if that fix is correct at our end, can you try downloading the dataset before #9742, examine the contents, delete the directory, download it with #9742 plus your proposed fix, and make sure the contents are the same (i.e., same set of files)? We don't want to include a bunch of extra junk that's in there (if it's in there), I wonder if that's why we wanted a
members=...adam2392 commentedon Sep 23, 2021
Looks like the contents are the same w/ the latest push to #9763
larsoner commentedon Sep 23, 2021
To me it looks like a bug that the old one is
HF_SEFand the new one ishf_sef. OnmacOSand Windows this will not matter, but on Linux it will.Also it does not seem to work for me:
adam2392 commentedon Sep 23, 2021
Hmmm working on a fix here.
So the issue with
HF_SEFvshf_sefseems to be that the folder in the tar file ishf_sef, but our desired folder_name is actuallyHF_SEF. That is probably the reason for these LOC: #9742 (comment)However, those LOC are what break our circleCI. https://github.com/fatiando/pooch/blob/7a236035009cb3b30288f023206aece64ea397e7/pooch/processors.py#L204-L221 assume that the underlying
memberis a file I think, rather than a folder. Seems like a bug for pooch.I think to match the casing of the folder name and get the untar in the right place, we can do a hack on our end:
adam2392 commentedon Sep 23, 2021
Upstream issue: fatiando/pooch#264
larsoner commentedon Sep 23, 2021
Agreed I would just rename. Although really maybe we can live with
hf_sefbeing the new name rather than fight with it. I don't think that dataset is downloaded super often...Maybe just fix the
names = [params['dataset_name'] for params in dataset_params]bug and then we'll merge #9763?adam2392 commentedon Sep 23, 2021
Sounds good. I fixed it now and also renamed the
HF_SEFfolder tohf_sef.