Answer the question
In order to leave comments, you need to log in
Problem with polling in python bot?
the code:
import telebot
import time
TOKEN = '1190811079:AAEui3GQq1yJOk8pivrcjA8cVMIFBi1lI0A'
bot = telebot.TeleBot(TOKEN)
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
bot.reply_to(message, "Howdy, how are you doing?")
@bot.message_handler(func=lambda m: True)
def echo_all(message):
bot.reply_to(message, message.text)
bot.polling()
bot.polling()
2020-05-09 18:36:30,423 (util.py:65 PollingThread) ERROR - TeleBot: "SSLError occurred, args=(MaxRetryError("HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot1190811079:AAEui3GQq1yJOk8pivrcjA8cVMIFBi1lI0A/getUpdates?offset=1&timeout=20 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056)')))"),)
Answer the question
In order to leave comments, you need to log in
Because Roskomnadzor blocks access to Telegram. Use a proxy, as indicated here , or use a VPS on which Telegram is not blocked.
ERROR - TeleBot: "SSLError occurred, args=(MaxRetryError('HTTPSConnectionPool(host=\'api.telegram.org\', port=443): Max retries exceeded with url: /bot1190811079:AAEui3GQq1yJOk8pivrcjA8cVMIFBi1lI0A/getUpdates?offset=1&timeout=20 (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'tls_process_server_certificate\', \'certificate verify failed\')],)",),))',),)
Traceback (most recent call last):
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question