Issue in Loading Data in Overview of MEG/EEG with MNE-Python

Hi,
I just got introduced to MNE and was trying to execute the code in Jupyter notebook for the overview of MEG/EEG with MNE-Python.
I encountered the following error.
Code:

sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
                                    'sample_audvis_filt-0-40_raw.fif')
raw = mne.io.read_raw_fif(sample_data_raw_file)
Error:
Using default location ~/mne_data for sample...
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-5fccb7270638> in <module>
----> 1 sample_data_folder = mne.datasets.sample.data_path()
      2 sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
      3                                     'sample_audvis_filt-0-40_raw.fif')
      4 raw = mne.io.read_raw_fif(sample_data_raw_file)

<decorator-gen-535> in data_path(path, force_update, update_path, download, verbose)

~\anaconda3\lib\site-packages\mne\datasets\sample\sample.py in data_path(path, force_update, update_path, download, verbose)
     22               verbose=None):  # noqa: D103
     23 
---> 24     return _download_mne_dataset(
     25         name='sample', processor='untar', path=path,
     26         force_update=force_update, update_path=update_path,

~\anaconda3\lib\site-packages\mne\datasets\utils.py in _download_mne_dataset(name, processor, path, force_update, update_path, download, accept)
    186             dataset_params.append(this_dataset)
    187 
--> 188     return fetch_dataset(dataset_params=dataset_params, processor=processor_,
    189                          path=path, force_update=force_update,
    190                          update_path=update_path, download=download,

~\anaconda3\lib\site-packages\mne\datasets\_fetch.py in fetch_dataset(dataset_params, processor, path, force_update, update_path, download, check_version, return_version, accept, auth, token)
    140     # processor to uncompress files
    141     if processor == "untar":
--> 142         processor = pooch.Untar(extract_dir=path)
    143     elif processor == "unzip":
    144         processor = pooch.Unzip(extract_dir=path)

TypeError: __init__() got an unexpected keyword argument 'extract_dir'
  • MNE-Python version: Python 3.8.5
  • operating system: Windows 11

Hello @adarshi_R and welcome to the forum!

Can you please share the output of

import mne
mne.sys_info()

Thanks,
Richard

Hello Richard,
Thanks for responding to me.
Here is the output:

Platform:       Windows-10-10.0.22000-SP0
Python:         3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
Executable:     C:\Users\Adarshi\anaconda3\python.exe
CPU:            Intel64 Family 6 Model 142 Stepping 12, GenuineIntel: 8 cores
Memory:         7.8 GB

mne:            0.24.0
numpy:          1.19.2 {blas=mkl_rt, lapack=mkl_rt}
scipy:          1.5.2
matplotlib:     3.3.2 {backend=module://ipykernel.pylab.backend_inline}

sklearn:        0.23.2
numba:          0.51.2
nibabel:        Not found
nilearn:        Not found
dipy:           Not found
cupy:           Not found
pandas:         1.1.3
mayavi:         Not found
pyvista:        Not found
pyvistaqt:      Not found
ipyvtklink:     Not found
vtk:            Not found
PyQt5:          5.9.2
ipympl:         Not found
mne_qt_browser: Not found

Thank you! Which version of pooch are you using?

Pooch version: 1.3.0

Can you please update pooch to version 1.5 and try again?

1 Like

Thank you, Richard!
That worked. Thank you for your assistance.