cloudforet-io / plugin-telegram-noti-protocol

Apache License 2.0
5 stars 3 forks source link

Sending messages works OK, but an error occurs continuously. #3

Open jihyungSong opened 1 year ago

jihyungSong commented 1 year ago

The error that occurs in the telegram pod is as follows.

telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/telegram/ext/updater.py", line 651, in _network_loop_retry
    if not action_cb():
  File "/usr/local/lib/python3.8/site-packages/telegram/ext/updater.py", line 602, in polling_action_cb
    updates = self.bot.get_updates(
  File "/usr/local/lib/python3.8/site-packages/telegram/ext/extbot.py", line 226, in get_updates
    updates = super().get_updates(
  File "/usr/local/lib/python3.8/site-packages/telegram/bot.py", line 133, in decorator
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/telegram/bot.py", line 3057, in get_updates
    self._post(
  File "/usr/local/lib/python3.8/site-packages/telegram/bot.py", line 298, in _post
    return self.request.post(
  File "/usr/local/lib/python3.8/site-packages/telegram/utils/request.py", line 361, in post
    result = self._request_wrapper(
  File "/usr/local/lib/python3.8/site-packages/telegram/utils/request.py", line 283, in _request_wrapper
    raise Conflict(message)
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
jihyungSong commented 1 year ago

python-telegram-botSDK is upgraded to 20.x currently, so code refactoring is required for developed based on the existing 13.x to 2.x.

The way clients are used has changed differently.

https://github.com/python-telegram-bot/python-telegram-bot/wiki/Introduction-to-the-API