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: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.