Answer the question
In order to leave comments, you need to log in
How to fix pyTelegramBotApi error?
Very often an error occurs when the bot works in the telegram:
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Answer the question
In order to leave comments, you need to log in
First import sleep
Next make bot.polling into a loopfrom time import sleep
while True:
try:
bot.polling(none_stop=True)
except Exception as _ex:
print(_ex)
sleep(15)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question