Hello.
When I run MNE data, in first step(sample_data), i face with these errors:
1)TLS/SSL connection has been closed (EOF) (_ssl.c:997)
2)HTTPSConnectionPool(host=‘osf.io’, port=443): Max retries exceeded with url: /86qa2/download?version=6 (Caused by SSLError(SSLZeroReturnError(6, ‘TLS/SSL connection has been closed (EOF) (_ssl.c:997)’)))
3)HTTPSConnectionPool(host=‘osf.io’, port=443): Max retries exceeded with url: /86qa2/download?version=6 (Caused by SSLError(SSLZeroReturnError(6, ‘TLS/SSL connection has been closed (EOF) (_ssl.c:997)’)))
could you please help me?
this might be because OSF was down for maintenance. Is it still happening?
Other possibilities are that you’re using a proxy or VPN or something, and that is blocking/interfering with the connection somehow (sorry I don’t know a lot about how those things work so I can’t offer concrete advice other than “try again without the VPN or proxy”).
You could also try downloading it directly: https://osf.io/download/86qa2/ and manually unpacking it into wherever mne.get_config("MNE_DATASETS_SAMPLE_PATH")
points to. If MNE finds it there, it will skip trying to download it again when you call mne.datasets.sample.data_path()
Thank you for your reply.
Unfortunately, it was not solved. I work with Macbook Pro, I don’t have any VPN.
Which macOS version, which Python version, and which MNE-Python version ist that?
Hello, thanks for replying.
MacBook Pro, Version 11.3.1
Python 3.10.10 64-bit
MNE 1.4.2
This is really odd; there must be some kind of connectivity issue due to a firewall, proxy, or similar. Are you by any chance in a corporate or university network?
I solve this problem with this code:
sample_data_folder = mne.datasets.sample.data_path(“/Users/Desktop/”,update_path=False, download=False)
sample_data_raw_file = (
sample_data_folder / “MNE-sample-data” / “MEG” / “sample” / “sample_audvis_filt-0-40_raw.fif”
)
raw = mne.io.read_raw_fif(sample_data_raw_file)
and it works in Jupyterlab only. But it does not work in Spyder yet.
Mostly just guessing at this point, but another thing to check here would be
python -c "import ssl; print(ssl.OPENSSL_VERSION)"
Also if you’re sending lots of requests to OSF simultaneously they might be throttling requests from your IP address.