pyTelegramBotAPI icon indicating copy to clipboard operation
pyTelegramBotAPI copied to clipboard

409 Conflict

Open MasterGroosha opened this issue 11 years ago • 7 comments

I've been getting 409 API Error 5 times today in line

Traceback (most recent call last):
  File "meduzabot.py", line 79, in <module>
    tb.get_update()  # cache exist message
  File "/usr/local/lib/python3.4/dist-packages/telebot/__init__.py", line 50, in get_update
    updates = apihelper.get_updates(self.token, offset=(self.last_update_id + 1), timeout=20)
  File "/usr/local/lib/python3.4/dist-packages/telebot/apihelper.py", line 68, in get_updates
    return _make_request(token, method_url, params=payload)
  File "/usr/local/lib/python3.4/dist-packages/telebot/apihelper.py", line 22, in _make_request
    raise ApiException(method_name, result)
telebot.apihelper.ApiException: getUpdates failed. Returned result: <Response [409]>

Is it something wrong with my code or these are Telegram servers' faults?

MasterGroosha avatar Jul 04 '15 22:07 MasterGroosha

I never confront this problem. I'll test tomorrow.

eternnoir avatar Jul 06 '15 06:07 eternnoir

Start
getUpdates failed. Returned result: <Response [409]>
Traceback (most recent call last):
  File "rastreiobot.py", line 113, in <module>
    tb.get_update()  # cache exist message
  File "/home/gabriel/pyTelegramBotAPI/telebot/__init__.py", line 106, in get_update
    updates = apihelper.get_updates(self.token, offset=(self.last_update_id + 1), timeout=20)
  File "/home/gabriel/pyTelegramBotAPI/telebot/apihelper.py", line 68, in get_updates
    return _make_request(token, method_url, params=payload)
  File "/home/gabriel/pyTelegramBotAPI/telebot/apihelper.py", line 22, in _make_request
    raise ApiException(method_name, result)
telebot.apihelper.ApiException: getUpdates failed. Returned result: <Response [409]>

I'm getting the same error now.

GabrielRF avatar Jul 15 '15 01:07 GabrielRF

In different places with the same API TOKEN?

eternnoir avatar Jul 18 '15 10:07 eternnoir

For me the problem is gone. Only 502 Error and ('Connection aborted.', gaierror(-5, 'No address associated with hostname')) sometimes

MasterGroosha avatar Jul 18 '15 10:07 MasterGroosha

I get a 409 error as well - right on start up and only half the time - not sure what is it causing it other than "Conflict: terminated by other long poll or webhook"

mahrens917 avatar Aug 14 '15 18:08 mahrens917

The comments here https://github.com/lukefx/hubot-telegram/issues/9 may help resolve this issue.

mahrens917 avatar Aug 14 '15 19:08 mahrens917

I discovered my issue - I was running another instance of my program and didn't know it. Stopping that instance resolved the issue.

mahrens917 avatar Aug 19 '15 12:08 mahrens917