I just installed MNE-python on Windows 10 (and Linux) and wanted to go through the tutorial. But the downloading the sample dataset is failing with the following error message:
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘osf.io’, port=443): Max retries exceeded with url: /86qa2/download?version=6 (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)’)))
I am wondering something to do with the firewall but not quite sure.
Thank you! Could you briefly describe the type of environment (university, corporate, …) from which you are trying to download? I’m asking because I would like to assess if other users might have this issue, too.
Pooch allows to pass a “downloader” that accepts custom parameters. If none is specified, it picks one automatically based on the protocol:
The downloader classes accept keyword arguments, which will be passed to requests.get():
The parameter we need to pass to disable TLS certificate validation is check=False.
So this boils down to us having to invoke Pooch’s downloading from HTTPS URLs with:
# assumes we get progressbar and check from the calling function
downloader = HTTPDownloader(progressbar=progressbar, check=check)
pooch.retrieve(
...,
downloader=downloader
)
I actually ran pip install --upgrade certifi yesterday to see if this helps because I came across this suggestion while just doing a random google search. This is what I get:
thanks for checking. While you wait for the fix, it should (?) be possible to directly download the dataset from your browser and manually put it in the right place. From here: OSF click the “3 dots” menu and choose download; decompress using a utility (e.g., 7-zip or peazip) and put the resulting folder inside C:\Users\YOURUSERNAME\mne_data\ (I think this is right for Windows 10, unless your computer is centrally managed and they’ve done something non-standard with user directories).