V
V
victos55462018-09-28 23:07:50
Python
victos5546, 2018-09-28 23:07:50

Why does the script crash when the bot sends an SMS to the chat?

I am using the pyTelegramBotAPI library.
When you click the "description" button in the bot, the user will be shown text using the send_message(ID, text) method.
From today, the bot started crashing as soon as the user clicks the button. Experimentally, I found out that the bot does not crash and the text is displayed if the line has less than 255 characters.
Although he worked for half a month, and never had such a problem, he displayed a description text of about 400 characters.
Error text: " telebot.apihelper.ApiException: A request to the Telegram API was unsuccessful. The server returned HTTP 429 Too Many Requests. Response body:
[b'{"ok":false,"error_code":429,"description" :"Too Many Requests: retry after 87","parameters":{"retry_after":

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-10-01
@cashncarry

It's not the length of the message, but the frequency of sending. This is a telegram limitation
https://core.telegram.org/bots/faq#my-bot-is-hitti...

A
Artyom, 2018-10-17
@tormich

"Too Many Requests: retry after 87" which in Busurman means - you often visit us: try again in 87 seconds.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question