[Mne_analysis] how to use tutorials when mne is not installed in home directory?

Megan Schendel mschendel at mrn.org
Thu Sep 10 17:30:10 EDT 2020
Search archives:

        External Email - Use Caution        

Hi all,
Still working on my upgrade issue, but in the meantime, I have a question
about the sample data.
I'm trying the tutorial for source timec ourse visualization...
... but when I try
data_path = sample.data_path()
I get an error.  It looks to me like it's looking for sample in my user
home directory, but I have mne installed in a shared directory. If I
understood better what the sample path should be, I could just create the
data path string.  Or perhaps I don't have the sample data at all because
of the discrepancy between mne path and sample path?

Thanks for your help, see the error below.

data_path = sample.data_path()
Downloading archive MNE-sample-data-processed.tar.gz to
(1.54 GB)
Error while fetching file https://osf.io/86qa2/download?version=5. Dataset
fetching aborted.       ?B/s]
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-6-a3504eb0c729> in <module>
----> 1 data_path = sample.data_path()

<decorator-gen-407> in data_path(path, force_update, update_path, download,

in data_path(path, force_update, update_path, download, verbose)
     17 def data_path(path=None, force_update=False, update_path=True,
     18               verbose=None):  # noqa: D103
---> 19     return _data_path(path=path, force_update=force_update,
     20                       update_path=update_path, name='sample',
     21                       download=download)

in _data_path(path, force_update, update_path, download, name,
check_version, return_version, archive_name)
    393         full_name = list()
    394         for u, an, h, fo in zip(url, archive_name, hash_,
--> 395             remove_archive, full = _download(path, u, an, h)
    396             full_name.append(full)
    397         del archive_name

in _download(path, url, archive_name, hash_, hash_type)
    450         if fetch_archive:
    451             logger.info('Downloading archive %s to %s' %
(archive_name, path))
--> 452             _fetch_file(url, full_name, print_destination=False,
    453                         hash_=hash_, hash_type=hash_type)
    454     return remove_archive, full_name

<decorator-gen-3> in _fetch_file(url, file_name, print_destination, resume,
hash_, timeout, hash_type, verbose)

in _fetch_file(url, file_name, print_destination, resume, hash_, timeout,
hash_type, verbose)
    115         else:
    116             initial_size = 0
--> 117         _get_http(url, temp_file_name, initial_size, timeout,
    119         # check hash sum eg md5sum

in _get_http(***failed resolving arguments***)
     53     del file_size
     54     chunk_size = 8192  # 2 ** 13
---> 55     with open(temp_file_name, mode) as local_file:
     56         while True:
     57             t0 = time.time()

FileNotFoundError: [Errno 2] No such file or directory:

In [7]: sample
Out[7]: <module 'mne.datasets.sample' from

MEG Technician
The Mind Research Network
1101 Yale Blvd. NE
Albuquerque, New Mexico 87106
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200910/ec03e11f/attachment.html 

More information about the Mne_analysis mailing list