SSL: CERTIFICATE_VERIFY_FAILED] #4298
Unanswered
AntonioMembrino
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
is it possible to avoid the error SSL: CERTIFICATE_VERIFY_FAILED] ? when i run the script in python i have no error. when i create the exe with pyinstaller i don't know if i need to add an ssl certificate or a dependencies like pyton-certifi-win32. i have this error in the run of the exe Exception during execution: Unknown error in HTTP implementation: SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)')..
`import os
import ssl
import certifi
import certifi_win32
from telegram import Bot
from telegram.request import HTTPXRequest
class AliceChannel:
def init(self):
# Adjust certifi_win32 to use certifi's PEM file
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
#example of usages
import asyncio
from datetime import datetime
from botNotifiche import AliceChannel
async def botNotifiche(text):
alice_channel = AliceChannel()
try:
asyncio.run(botNotifiche("Test message"))
except Exception as e:
print("Exception during execution: " + str(e))`
Beta Was this translation helpful? Give feedback.
All reactions