#๐Ÿ”’ python ssl problem

48 messages ยท Page 1 of 1 (latest)

karmic atlasBOT
#

@shy gazelle

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

shy gazelle
#

hello could u help me to fix this

#

thiss is the problem that i get when i run the bot

#

File "C:\Program Files\Python312\Lib\site-packages\aiohttp\connector.py", line 1027, in _wrap_create_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
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:1000)')]

#

the bot is not working

#

i keep get this

wind cosmos
#

Are you using some kind of proxy or vpn?

What operating system it is? I tried to google and it seems in the past a lot of people had this problem on Mac

buoyant torrent
buoyant torrent
#

What OS?

shy gazelle
#

windows

#

@buoyant torrent what i must do

buoyant torrent
#

I don't really know where ssl certificates are on windows and how to update them. Windows seems like a strange choice for a server

shy gazelle
#

lemme cheack

buoyant torrent
#

Without python?

shy gazelle
#

worked

#

from google

buoyant torrent
shy gazelle
#

yup

#

like is there any way to fix

#

by telling vps owners

#

to do

#

smth

buoyant torrent
#

I don't really know, this is an issue with an OS component and i don't know what's causing it. You may try to use non-system certificates, but this is kind of a hacky solution

shy gazelle
#

i will contact them

#

fr rip money

buoyant torrent
#

You can try pip install certifi and adding

import certifi
import os

certfile = certifi.where()
os.environ["SSL_CERT_FILE"] = certfile```
shy gazelle
#

lemme try

buoyant torrent
#

This may or may not work (discord.py, as any other library, may choose not to respect this setting)

#

Also this isn't recommended, as now the OS cannot update certificates for you, so you may need to
pip install -U certifi manually in the future

shy gazelle
#

worked!!!!

#

u are legend bro

buoyant torrent
#

Remember, this is kind of a security issue

#

So either update the package once in a while

shy gazelle
#

oh

#

tysm broo

buoyant torrent
#

Or find another way

#

No problem, have a great day!

#

It's !close to close

shy gazelle
#

!close

karmic atlasBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.