1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Python SSL_Error when using systemctl

Discussão em 'Python' iniciado por Stack, Fevereiro 9, 2025.

  1. Stack

    Stack Membro Participativo

    So, I have an Old Ubuntu server image running on an old laptop and I want to run a discord bot on it, and everything worked fine with it until I tried to make a service out of it. When I do that, it gives me the exact same SSL error that it gave before updating CA_CERTIFICATES. I tried both systemd and supervisor, they gave the same error.

    aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1147)')]


    I tried updating the certificates and downloading certifi to no avail, I also tried this snippet:

    import ssl

    try:
    _create_unverified_https_context = ssl._create_unverified_context
    except AttributeError:
    pass
    else:
    ssl._create_default_https_context = _create_unverified_https_context


    from here. None of it worked

    Continue reading...

Compartilhe esta Página