kmahyyg / tg-bot-dailylife

My private telegram bot
https://u.nu/yygtgbot
GNU Affero General Public License v3.0
6 stars 1 forks source link

ApiException: A request to the Telegram API was unsuccessful. The server returned HTTP 429 Too Many Requests. R... #7

Closed kmahyyg closed 6 years ago

kmahyyg commented 6 years ago

https://sentry.io/kmahyyg/python-my-tgbot/issues/471663391/

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 1","parameters":{"retry_after":1}}']
  File "tgbot_fnA.py", line 299, in <module>
    bot.set_webhook(url=WEBHOOK_QUERY, certificate=CERT_CONT)
  File "telebot/__init__.py", line 104, in set_webhook
    return apihelper.set_webhook(self.token, url, certificate, max_connections, allowed_updates)
  File "telebot/apihelper.py", line 150, in set_webhook
    return _make_request(token, method_url, params=payload, files=files)
  File "telebot/apihelper.py", line 56, in _make_request
    return _check_result(method_name, result)['result']
  File "telebot/apihelper.py", line 75, in _check_result
    raise ApiException(msg, method_name, result)

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 1","parameters":{"retry_after":1}}']
kmahyyg commented 6 years ago

Commit 18accfd trying to solve this by check and set TAG of WEBHOOK_ISSET need to be tested