Telegram API erorr: 'message is too long' #49

Closed
opened 2023-06-26 16:09:47 +00:00 by skobkin · 0 comments
Collaborator
# python3 update.py
Starting the updater with logging level INFO
2023-06-26 16:08:07: <UpdateManager> [INFO] Running update
2023-06-26 16:08:07: <UpdateManager> [INFO] Feeds to update: 2
2023-06-26 16:08:07: <UpdateManager> [INFO] Processing [2] https://habr.com/ru/rss/all/all/?fl=ru
2023-06-26 16:08:08: <UpdateManager> [INFO] Processing [5] https://github.com/transmission/transmission/releases.atom
Traceback (most recent call last):
  File "/bot/update.py", line 29, in <module>
    updater.update()
  File "/bot/update_manager.py", line 39, in update
    self.notifier.send_updates(chat_ids, diff, feed_obj.title)
  File "/bot/telegram.py", line 146, in send_updates
    self.__send_update(chat_id, update)
  File "/bot/telegram.py", line 150, in __send_update
    self.bot.send_message(
  File "/usr/local/lib/python3.10/site-packages/telebot/__init__.py", line 978, in send_message
    apihelper.send_message(
  File "/usr/local/lib/python3.10/site-packages/telebot/apihelper.py", line 267, in send_message
    return _make_request(token, method_url, params=payload, method='post')
  File "/usr/local/lib/python3.10/site-packages/telebot/apihelper.py", line 152, in _make_request
    json_result = _check_result(method_name, result)
  File "/usr/local/lib/python3.10/site-packages/telebot/apihelper.py", line 179, in _check_result
    raise ApiTelegramException(method_name, result, result_json)
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: message is too long
``` # python3 update.py Starting the updater with logging level INFO 2023-06-26 16:08:07: <UpdateManager> [INFO] Running update 2023-06-26 16:08:07: <UpdateManager> [INFO] Feeds to update: 2 2023-06-26 16:08:07: <UpdateManager> [INFO] Processing [2] https://habr.com/ru/rss/all/all/?fl=ru 2023-06-26 16:08:08: <UpdateManager> [INFO] Processing [5] https://github.com/transmission/transmission/releases.atom Traceback (most recent call last): File "/bot/update.py", line 29, in <module> updater.update() File "/bot/update_manager.py", line 39, in update self.notifier.send_updates(chat_ids, diff, feed_obj.title) File "/bot/telegram.py", line 146, in send_updates self.__send_update(chat_id, update) File "/bot/telegram.py", line 150, in __send_update self.bot.send_message( File "/usr/local/lib/python3.10/site-packages/telebot/__init__.py", line 978, in send_message apihelper.send_message( File "/usr/local/lib/python3.10/site-packages/telebot/apihelper.py", line 267, in send_message return _make_request(token, method_url, params=payload, method='post') File "/usr/local/lib/python3.10/site-packages/telebot/apihelper.py", line 152, in _make_request json_result = _check_result(method_name, result) File "/usr/local/lib/python3.10/site-packages/telebot/apihelper.py", line 179, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: message is too long ```
skobkin added the
bug
label 2023-06-26 16:09:47 +00:00
skobkin self-assigned this 2023-06-26 16:09:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Miroslavsckaya/tg_rss_bot#49
No description provided.