Certifacte verify failed: certificate has expired (_ssl.c:1108)

When trying to run my Discord bot I get this error:

raise ClientConnectorCertificateError(
    aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to
    host discordapp.com:443 ssl:True [SSLCertVerificationError: 
   (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: 
   certificate has expired (_ssl.c:1108)')]

It just started happening out of nowhere and happens every time.

I'm using Python 3.8 on Windows 10.

What does this mean and how do I fix it?


To fix this:

  • Go to discord.com with Internet Explorer (Ran as Administrator)

  • Click the lock on the top right

  • Click view certificates

  • Install one

PS: If your antivirus is active for the web browser and this solution doesn't work, try disabling it and try again.