fsaverage certificate_verify_failed error

  • MNE-Python version: 3.8.8
  • operating system: Windows 10

I am trying to create a source space, to calculate a forward model for a subject without an MRI. This requires that I use fsaverage. However, there seems to be a problem downloading the fsaverage files. The code is below, any pointers to how I could resolve this?

import mne
from mne.datasets import fetch_fsaverage

(produces this error)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1125)>

Thank you for your time!

Hello @dsrishyla and welcome to the forum!

How did you install MNE-Python? The error message you’re seeing typically indicates that the certifi package is outdated.

Best wishes,

I am running python on jupyter notebook. I used the following command to install mne;
pip install mne

I suggest you follow our official installation instructions
This is your best bet to ensure everything will just work.

In an attempt to get your download to work on your existing installation, you could try running pip install -U certifi
If that doesn’t fix the issue, all I can suggest is to follow the installation docs linked to above.

Best wishes,

I will try this - thank you for your assistance, Richard!


1 Like