mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python

Home Page:https://mne.tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't download the fsaverage data by mne.datasets.fetch_fsaverage(verbose=0)

dengzuxuan opened this issue · comments

Description of the problem

I use fs_dir = mne.datasets.fetch_fsaverage(verbose=0) to download data, but throw error ,the error info is :
C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\externals\tqdm\__init__.py:5: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(__version__) < LooseVersion('4.36'): C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\externals\tqdm\__init__.py:5: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(__version__) < LooseVersion('4.36'): 0%| | Downloading : 17.2k/0.00 [00:00<00:00, 61.2kB/s] Traceback (most recent call last): File "C:\Users\Colin\Desktop\esinet-main\tutorials\download.py", line 5, in <module> fs_dir = mne.datasets.fetch_fsaverage(verbose=0) File "<decorator-gen-504>", line 22, in fetch_fsaverage File "C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\datasets\_fsaverage\base.py", line 72, in fetch_fsaverage _manifest_check_download( File "C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\datasets\utils.py", line 853, in _manifest_check_download _fetch_file(url, fname_path, hash_=hash_) File "<decorator-gen-3>", line 24, in _fetch_file File "C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\utils\fetching.py", line 125, in _fetch_file raise RuntimeError('Hash mismatch for downloaded file %s, ' RuntimeError: Hash mismatch for downloaded file C:\Users\Colin\AppData\Local\Temp\tmp5cj8_vyl\temp.zip.part, expected 5133fe92b7b8f03ae19219d5f46e4177 but got be7d528a8fafda20f1ef9fe481745e07 Error while fetching file https://osf.io/3bxqt/download?revision=2. Dataset fetching aborted.

Steps to reproduce

fs_dir = mne.datasets.fetch_fsaverage(verbose=0)

Link to data

No response

Expected results

expected download data

Actual results

C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\externals\tqdm\__init__.py:5: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(__version__) < LooseVersion('4.36'): C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\externals\tqdm\__init__.py:5: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(__version__) < LooseVersion('4.36'): 0%| | Downloading : 17.2k/0.00 [00:00<00:00, 61.2kB/s] Traceback (most recent call last): File "C:\Users\Colin\Desktop\esinet-main\tutorials\download.py", line 5, in <module> fs_dir = mne.datasets.fetch_fsaverage(verbose=0) File "<decorator-gen-504>", line 22, in fetch_fsaverage File "C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\datasets\_fsaverage\base.py", line 72, in fetch_fsaverage _manifest_check_download( File "C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\datasets\utils.py", line 853, in _manifest_check_download _fetch_file(url, fname_path, hash_=hash_) File "<decorator-gen-3>", line 24, in _fetch_file File "C:\Users\Colin\Desktop\esinet-main\venv\lib\site-packages\mne\utils\fetching.py", line 125, in _fetch_file raise RuntimeError('Hash mismatch for downloaded file %s, ' RuntimeError: Hash mismatch for downloaded file C:\Users\Colin\AppData\Local\Temp\tmp5cj8_vyl\temp.zip.part, expected 5133fe92b7b8f03ae19219d5f46e4177 but got be7d528a8fafda20f1ef9fe481745e07 Error while fetching file https://osf.io/3bxqt/download?revision=2. Dataset fetching aborted.

Additional information

Platform: Windows-10-10.0.26085-SP0
Python: 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
Executable: C:\Users\Colin\Desktop\esinet-main\venv\Scripts\python.exe
CPU: Intel64 Family 6 Model 186 Stepping 2, GenuineIntel: 20 cores
Memory: Unavailable (requires "psutil" package)
mne: 0.23.0
numpy: 1.22.3 {}
scipy: 1.7.0
matplotlib: 3.4.2 {backend=module://backend_interagg}

sklearn: 0.24.2
numba: Not found
nibabel: Not found
nilearn: Not found
dipy: Not found
cupy: Not found
pandas: 1.3.1
mayavi: Not found
pyvista: 0.31.3 {pyvistaqt=0.5.0, OpenGL 4.5.0 NVIDIA 546.80 via NVIDIA GeForce RTX 4060 Laptop GPU/PCIe/SSE2}
vtk: 9.0.3
PyQt5: 5.15.4
None

Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴

python -c "mne.datasets.fetch_fsaverage(verbose=0)" can download data

Glad you found a workaround!

mne: 0.23.0

This is a very old version of MNE. I strongly suggest updating. It will likely fix the error you saw too.