Answer the question
In order to leave comments, you need to log in
Certificate error when requesting information about telegram bot, what should I do?
I'm new to python and bot development, I'm trying to get at least a regular message from the bot using the code, I don't get any messages when I
request any information about the bot, I get an error - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl. c:1056)
Ref code:
import telebot
import constants
bot = telebot.TeleBot(constants.token)
bot.send_message(chat_id, "test")
upd = bot.get_updates()
print(upd)
Answer the question
In order to leave comments, you need to log in
The problem is that the SSL certificate of the server or proxy does not pass the check of the library that is responsible for the network connection, since the certificate is self-signed.
The simplest solution (though not optimal) is to disable certificate verification. How to do this in your particular library for Telegram, you need to look in the documentation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question