Skip to content

Conversation

@tahatt13
Copy link
Collaborator

The purpose of this PR is to add ERPCore datasets Here is the link to the official website of the dataset : https://erpinfo.org/erp-core.

tahatt13 and others added 30 commits June 14, 2024 15:43
Signed-off-by: Bru <a.bruno@aluno.ufabc.edu.br>
Copy link
Collaborator

@PierreGtch PierreGtch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to load data from subject 1 with the latest version of the code using:

data = ErpCore2021_ERN().get_data([1])

but got:

requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='files.osf.io', port=443): Read timed out. (read timeout=15)

I tried on eduroam and on a mobile connection.
Am I the only one to have problem downloading this dataset?

@bruAristimunha bruAristimunha changed the title Adding ERPCore datasets [EHN] Adding ERPCore datasets Feb 13, 2025
@sebVelut
Copy link
Collaborator

I have tested to install the moabb version with the ERPCORE2021, and try to get the data but I get this warning :
InsecureRequestWarning: Unverified HTTPS request is being made to host '[files.osf.io](http://files.osf.io/)'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
and this error:
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='[files.osf.io](http://files.osf.io/)', port=443): Read timed out. (read timeout=5)

@PierreGtch
Copy link
Collaborator

With the latest version, download works on my side
But the local file path is strange:

Downloading data from 'https://files.osf.io/v1/resources/q6gwp/providers/osfstorage/600df65e75226b017d517f6d/?zip=' to file '/Users/Pierre.Guetschel/mne_data/MNE-erpcoreern2021-data/MNE-erpcoreern2021-data/v1/resources/q6gwp/providers/osfstorage/?zip='.

And the file can't be loaded:

Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevconsole.py", line 364, in runcode
    coro = func()
  File "<input>", line 1, in <module>
  File "/Users/Pierre.Guetschel/Projects/moabb/moabb/datasets/base.py", line 433, in get_data
    data[subject] = self._get_single_subject_data_using_cache(
  File "/Users/Pierre.Guetschel/Projects/moabb/moabb/datasets/base.py", line 527, in _get_single_subject_data_using_cache
    sessions_data = self._get_single_subject_data(subject)
  File "/Users/Pierre.Guetschel/Projects/moabb/moabb/datasets/erpcore2021.py", line 213, in _get_single_subject_data
    file_path = self.data_path(subject)[0]
  File "/Users/Pierre.Guetschel/Projects/moabb/moabb/datasets/erpcore2021.py", line 271, in data_path
    dataset_path = self.download_and_extract(path=path, force_update=force_update)
  File "/Users/Pierre.Guetschel/Projects/moabb/moabb/datasets/erpcore2021.py", line 324, in download_and_extract
    zip_ref = z.ZipFile(path_zip, "r")
  File "/Users/Pierre.Guetschel/miniforge3/envs/moabb/lib/python3.9/zipfile.py", line 1268, in __init__
    self._RealGetContents()
  File "/Users/Pierre.Guetschel/miniforge3/envs/moabb/lib/python3.9/zipfile.py", line 1335, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Also I get the same warning as @sebVelut :

InsecureRequestWarning: Unverified HTTPS request is being made to host 'files.osf.io'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings

@bruAristimunha
Copy link
Collaborator

it is done @sebVelut and @PierreGtch, please review when everything it is green :)

@bruAristimunha
Copy link
Collaborator

Hey @PierreGtch, @sebVelut and @sylvchev!

I would like to merge theses datasets to include into my benchmark, can we merge today?

Copy link
Collaborator

@sebVelut sebVelut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested to download one or several subjects on my computer (by cloning and installing moabb from git) and I have no more problem

@bruAristimunha
Copy link
Collaborator

Ok @sebVelut, thanks, I will merge this when everything is green :)

@bruAristimunha bruAristimunha enabled auto-merge (squash) February 26, 2025 08:04
@bruAristimunha bruAristimunha merged commit 8fee7cd into NeuroTechX:develop Feb 26, 2025
15 checks passed
@bruAristimunha
Copy link
Collaborator

Thank you so much @tahatt13 🙏🏽

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants