Skip to content

mne.datasets.fetch_data returns error when the data is already downloaded  #9806

Closed

Description

@hndgzkn

Describe the bug

When I try to download a file already downloaded with mne.datasets.fetch_dataset, and set force_update=False, I get the following error:

  File ".../python3.9/site-packages/mne/datasets/_fetch.py", line 194, in fetch_dataset
    _do_path_update(path, update_path, config_key, name)
  File ".../python3.9/site-packages/mne/datasets/utils.py", line 142, in _do_path_update
    set_config(key, path, set_env=False)
  File ".../python3.9/site-packages/mne/utils/config.py", line 273, in set_config
    _validate_type(key, 'str', "key")
  File ".../python3.9/site-packages/mne/utils/check.py", line 419, in _validate_type
    raise TypeError(f"{_item_name} must be an instance of {type_name}, "
TypeError: key must be an instance of str, got <class 'NoneType'> instead.

With false_update=True, there is no problem.

Steps to reproduce

from mne.datasets import fetch_dataset

fetch_dataset(
    {"dataset_name": "LFP_data",
     "url": "https://github.com/hitziger/AWL/raw/master/Experiments/data/LFP_data_contiguous_1250_Hz.mat",
     "archive_name": "LFP_data_contiguous_1250_Hz.mat",
     "folder_name": "LFP",
     "hash": None
    },
    path=None,
    force_update=False
)

Additional information

Platform:      Linux-4.19.0-14-amd64-x86_64-with-glibc2.28
Python:        3.9.7 (default, Sep 16 2021, 13:09:58)  [GCC 7.5.0]
Executable:    .../bin/python
mne:           0.24.dev0
numpy:         1.20.3 {blas=openblas, lapack=openblas}
scipy:         1.7.1
matplotlib:    3.4.3 {backend=TkAgg}

sklearn:       1.0
numba:         0.54.0
nibabel:       3.2.1
nilearn:       Not found
dipy:          Not found
cupy:          Not found
pandas:        Not found
mayavi:        Not found
pyvista:       Not found
vtk:           Not found
pooch:         v1.5.1

Activity

  1. welcome commented on Oct 5, 2021

    @welcome

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions