eternnoir / pyTelegramBotAPI

Python Telegram bot api.
GNU General Public License v2.0
8.11k stars 2.03k forks source link

Bot does not recover properly when using infinity_polling #1058

Closed ModischFabrications closed 3 years ago

ModischFabrications commented 3 years ago
  1. What version of pyTelegramBotAPI are you using? 3.7.4

  2. What OS are you using? Raspbian

  3. What version of python are you using? 3.6.9


Testing out bot.infinity_polling() as recommended in #1057 I noticed a bug in the recovery from exceptions:

It seems like the bot does not recover completely from a collision from another bot instance. It crashes and restarts successfully, which is nice, but it seems to get stuck in a restart loop every 3s (sleep time on recovery). I would guess there is an implicit state that carries over the restart that still contains the cancel instruction, but I haven't found anything obvious.

This bug can be bypassed by not starting another instance with the same token, but I assume that the same bug will also strike with other exceptions, unrelated to this cause.

Reproduction:

  1. Start instance 1 with bot.infinity_polling() and logging.INFO
  2. Start another instance to provoke a collision
  3. stop second bot to allow instance 1 to run
  4. -> instance 1 has crashed and is stuck in restart loop afterwards

log instance 1:

2020-12-31 16:03:07,705 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2020-12-31 16:19:07,961 (__init__.py:489 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"
2020-12-31 16:19:07,961 (__init__.py:496 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry"
2020-12-31 16:19:11,546 (__init__.py:489 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"
2020-12-31 16:19:11,546 (__init__.py:496 MainThread) INFO - TeleBot: "Waiting for 0.5 seconds until retry"
2020-12-31 16:42:57,901 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2020-12-31 16:43:00,905 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2020-12-31 16:43:03,908 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2020-12-31 16:43:06,914 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2020-12-31 16:43:09,920 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."

log instance 2:

2020-12-31 16:19:07,872 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2020-12-31 16:19:11,256 (__init__.py:489 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"
2020-12-31 16:19:11,256 (__init__.py:496 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry"

Process finished with exit code -1

PS: Happy new year and thanks for the fast responses!

Badiboy commented 3 years ago

Bot is threaded or not threaded?

Badiboy commented 3 years ago

BTW. Could you please try to use the most recent branch: pip install -U git+https://github.com/eternnoir/pyTelegramBotAPI.git#egg=pyTelegramBotAPI There were updates in polling exceptions handling.

ModischFabrications commented 3 years ago

threaded I think so, I am using default settings.

recent branch I installed it from there, but I am unsure if the bot has received the correct version. version does not exist, is there another place the current version is noted?

The way it looks right now is it that I can't replicate the problem while testing, I will check with the production system tomorrow.

ModischFabrications commented 3 years ago

I tested around, looks like the problem is not from the collision but from something else, I did not spot the 20min difference in the logs. I will investigate further, looks like there are two problems on a long running instance (>30min), might be similar to #1057, but I could not confirm yet.

Problem 1 is causing restarts without any hints in the log, Problem 2 leads to a recursion error and then restarts as seen below:

Im still on the current release instead of the newest git version (need to resolve some conflicts first). Probably another cause, but no recovery as a result either. Will try to test with the newest version the next few days.

File "/home/minecraft/.local/share/virtualenvs/MineGramBot-lr3Vf42U/lib/python3.6/site-packages/telebot/util.py", line 242, in <lambda>
    e.set = lambda: or_set(e)
  File "/home/minecraft/.local/share/virtualenvs/MineGramBot-lr3Vf42U/lib/python3.6/site-packages/telebot/util.py", line 229, in or_set
    self._set()
  File "/home/minecraft/.local/share/virtualenvs/MineGramBot-lr3Vf42U/lib/python3.6/site-packages/telebot/util.py", line 242, in <lambda>
    e.set = lambda: or_set(e)
  File "/home/minecraft/.local/share/virtualenvs/MineGramBot-lr3Vf42U/lib/python3.6/site-packages/telebot/util.py", line 229, in or_set
    self._set()
RecursionError: maximum recursion depth exceeded

2021-01-02 22:09:50,725 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2021-01-02 22:09:53,728 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2021-01-02 22:09:56,733 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2021-01-02 22:09:59,738 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
2021-01-02 22:10:02,744 (__init__.py:460 MainThread) INFO - TeleBot: "Started polling."
ModischFabrications commented 3 years ago

Okay, installed and tested it, but had to remove the egg. It still occurs, the newest version still contains these (2?) bugs with the same effect that restarting is an endless loop. @Badiboy any other ideas?

Badiboy commented 3 years ago

@ModischFabrications I'll try to check, had no time yet. But I will. :)

ModischFabrications commented 3 years ago

Hey, do you have an estimate on when you can look into it? No pressure, I'm just evaluating when my bot is available to be deployed permanently.

Badiboy commented 3 years ago

I cannot reproduce the problem.

image

Badiboy commented 3 years ago

On Raspbian.

image

Badiboy commented 3 years ago

recent branch I installed it from there, but I am unsure if the bot has received the correct version. version does not exist, is there another place the current version is noted?

3.7.5 is released several days ago. You can try general update to be sure it's the latest. Version is in file version.py

ModischFabrications commented 3 years ago

Can't reproduce

Sorry, seems like a misunderstanding. I could not reproduce the error from the collision either, but had it on a long running instance (>30min). https://github.com/eternnoir/pyTelegramBotAPI/issues/1058#issuecomment-753527244 described it best it think. Your test setup seems to be very similar, have you tried to let it run for longer? Thanks for the thorough investigation!

I will test the newest version now and update this comment as soon as I hit the bug.

-- Update: recursion error still hits, see the stack trace:

C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\Scripts\python.exe D:/Kreativ/Programme/Python/MineGramBot/main.py
2021-01-12 22:49:06,925 (__init__.py:485 MainThread) INFO - TeleBot: "Started polling."
Starting up...
My API status: {'id': 1480424537, 'is_bot': True, 'first_name': 'ModischMinecraftBot', 'username': 'ModischMinecraftBot', 'last_name': None, 'language_code': None, 'can_join_groups': True, 'can_read_all_group_messages': False, 'supports_inline_queries': False}
Press CTRL+C to stop server
Old attempt from 457188097
2021-01-12 23:38:18,031 (__init__.py:459 MainThread) ERROR - TeleBot: "Infinity polling exception: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))"
2021-01-12 23:38:21,037 (__init__.py:485 MainThread) INFO - TeleBot: "Started polling."
2021-01-12 23:40:06,192 (__init__.py:510 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"
2021-01-12 23:40:06,193 (__init__.py:517 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry"
2021-01-12 23:40:06,456 (__init__.py:459 MainThread) ERROR - TeleBot: "Infinity polling exception: maximum recursion depth exceeded"

[...experiments...]

2021-01-12 23:43:52,574 (__init__.py:510 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"
2021-01-12 23:43:52,574 (__init__.py:517 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry"
2021-01-12 23:43:52,833 (__init__.py:459 MainThread) ERROR - TeleBot: "Infinity polling exception: maximum recursion depth exceeded"
2021-01-12 23:43:55,833 (__init__.py:485 MainThread) INFO - TeleBot: "Started polling."
Exception in thread WorkerThread1:
Traceback (most recent call last):
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\urllib3\connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\urllib3\connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "c:\program files\python39\lib\http\client.py", line 1347, in getresponse
    response.begin()
  File "c:\program files\python39\lib\http\client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "c:\program files\python39\lib\http\client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "c:\program files\python39\lib\socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "c:\program files\python39\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "c:\program files\python39\lib\ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\urllib3\util\retry.py", line 531, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\urllib3\packages\six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\urllib3\connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\urllib3\connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "c:\program files\python39\lib\http\client.py", line 1347, in getresponse
    response.begin()
  File "c:\program files\python39\lib\http\client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "c:\program files\python39\lib\http\client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "c:\program files\python39\lib\socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "c:\program files\python39\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "c:\program files\python39\lib\ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run
    task(*args, **kwargs)
  File "D:\Kreativ\Programme\Python\MineGramBot\modules\bot_commands.py", line 140, in status_command
    msg_send = bot.send_message(
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 734, in send_message
    apihelper.send_message(self.token, chat_id, text, disable_web_page_preview, reply_to_message_id,
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 206, in send_message
    return _make_request(token, method_url, params=payload, method='post')
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 107, in _make_request
    result = _get_req_session().request(
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\requests\adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files\python39\lib\threading.py", line 950, in _bootstrap_inner
    self.run()
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 79, in run
    self.exception_callback(self, self.exception_info)
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 112, in on_exception
    self.exception_event.set()
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 241, in <lambda>
    e.set = lambda: or_set(e)
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 228, in or_set
    self._set()
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 241, in <lambda>
    e.set = lambda: or_set(e)
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 228, in or_set
    self._set()
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 241, in <lambda>
    e.set = lambda: or_set(e)
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 228, in or_set
    self._set()

[...]

  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 241, in <lambda>
    e.set = lambda: or_set(e)
  File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 228, in or_set
    self._set()
RecursionError: maximum recursion depth exceeded

Process finished with exit code -1
Badiboy commented 3 years ago

Problem 1 is causing restarts without any hints in the log

This is the problem 1? I don't see any problem here. When long polling there may "ConnectionResetError" occur. Nobody know who raise it somewhere downstairs. infinity_polling restart the polling loop and should work well after it. No hints in log... Yes, there was no hints. No there are. But the behaviour is the same.

It's very hard to catch what IS THE PROBLEM. Problem 1, problem 2, cannot reproduce, not this problem...

ModischFabrications commented 3 years ago

Sorry, it's a mix-up of language barrier, wrong assumptions (that it was caused by a collision) and problems that are difficult to trace (>30min runtime). The collision is not a problem anymore, infinity_polling handles that restart. The ConnectionResetError is also circumvented by using infinity_polling, which I am using, so it shouldn't be part of the problem either.

Let me try to explain the problem better:

Yes, there was no hints. No there are. But the behavior is the same.

I'm not sure I understand that correctly. Do you mean you added more logging and the problem should be more visible now while testing with the newest version?

Would it have been easier to follow if I had fixed the wrong assumptions at the start instead of appending new discoveries? I am still testing to see if it comes up again in *.5.

Badiboy commented 3 years ago
2021-01-13 02:01:23,617 INFO True
2021-01-13 02:01:38,780 ERROR Infinity polling exception: HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=11)
2021-01-13 02:01:52,866 ERROR Infinity polling exception: maximum recursion depth exceeded
2021-01-13 02:02:23,084 ERROR Infinity polling exception: maximum recursion depth exceeded
2021-01-13 02:02:37,176 ERROR Infinity polling exception: maximum recursion depth exceeded
2021-01-13 02:02:51,256 ERROR Infinity polling exception: maximum recursion depth exceeded
2021-01-13 02:03:08,535 ERROR Infinity polling exception: maximum recursion depth exceeded

Hmmm, seems I see it also. I'll go deeper.

Badiboy commented 3 years ago

Seems that I got it.

Try the GIT version. pip install -U git+https://github.com/eternnoir/pyTelegramBotAPI.git Version should be 3.7.5.u1.

ModischFabrications commented 3 years ago

Awesome! Looks like the recursion error is fixed in the new version.

Version is '3.7.5.u2' btw, but it worked, so no problem there.

Long running instances still encounter a ConnectionReset on the first message after a long runtime/break and drop the affected message even with the newer version, but this is a new problem in of itself and deserves a new issue:

2021-01-14 16:39:10,918 (__init__.py:490 MainThread) INFO - TeleBot: "Started polling."
...
2021-01-14 17:06:03,262 (__init__.py:463 MainThread) ERROR - TeleBot: "Infinity polling exception: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))"
2021-01-14 17:06:06,265 (__init__.py:490 MainThread) INFO - TeleBot: "Started polling."

For clarification: The restart itself works, the dropped message is the problem.

Badiboy commented 3 years ago

Version u2 appears later with aniother fix, so it's ok :) Fine that main problem is gone.

Regarding this: 'An existing connection was forcibly closed by the remote host'

  1. Remote host do this, so I definitely do not know what can be done from bot side.
  2. What "dropped message" you are talking about? Incoming? Outgoing? Are you sure that something is dropped?

Currently I have a bot running for ~20 hours in polling mode (usually I use webhooks): faced no problems yet...

ModischFabrications commented 3 years ago

dropped message

The closed connection exception is only triggered when sending a message to the bot. This is how I trigger it:

  1. Start bot, let it run for >30min (I think, can't see a specific cause)
  2. send a telegram message to the bot
  3. -> The bot crashes with the connection reset message before being able to answer
  4. -> The "missing" message that crashed the bot was never answered

Should I post this as it's own issue? This issue is unrelated to the recovery from the start and others looking for the same problem won't find it here.

Badiboy commented 3 years ago

Currently I have a bot running for ~20 hours in polling mode (usually I use webhooks): faced no problems yet...

I know that some users face the problem, but I cannot see it myself.

Can you run bot with "DEBUG" logging level? It should log traceback on exception now, may be we'll see something helpful there...

ModischFabrications commented 3 years ago

This is the error with a stack trace, feel free to tell me if you need more. It went on with more "another exception occurred", but this should capture the essential parts.

error.txt

Badiboy commented 3 years ago

@ModischFabrications

image

I see here that error occurs not when library queries the updates, but when your bot answering to user. So to avoid reply lost when sending message you can catch thhis exception and re-send the message.

If you want to go deeper to the reasons. When library sends any request it creates the requests session and stores it. When you send next request library uses existing session for optimization. It seems that for rarely used bots and the Session may die while waiting. I suppose it may depend on various operationg system settings: for some cases it happens, for some it does not.

As far as this problem occurs for some library users, I think it may be reasonable to create an option for rarely used bots which will force re-creation of session on every request. It should help for cases like yours. If you think it will help for your case - we can try implementing this.

ModischFabrications commented 3 years ago

answering to user / Session may die while waiting

Good eye! Session timeout makes sense, this also explains why the error occurs only when answering after a long delay. For reference: This error happened both on Win10 and Raspbian. I can only agree with your way of thought that fixing it will improve stability, especially for newcomers.

As for the flag for a forced recreation of sessions on every message: Recreating for every request will fix the problem, but will introduce a tradeoff decision between stability and performance, which might hinder dynamic upscaling with usage. If I understand the situation correctly, there are ways to combine both without compromising: A: Track timestamps and check last usage of session prior to sending a message, forcing recreation if it exceeds a threshold (10min?). B: Treat this ConnectionResetError as a notification that the current session has timed out and force recreation (max 3 tries?)

I haven't looked into the code to evaluate these options, so please take these suggestions with a grain of salt. Option B feels like the cleanest imho. I would appreciate either solution.

Badiboy commented 3 years ago

https://github.com/eternnoir/pyTelegramBotAPI/pull/1077 Try this. Version 3.7.5.u4.

A: Track timestamps and check last usage of session prior to sending a message, forcing recreation if it exceeds a threshold (10min?).

I went exactly to the same point. apihelper.SESSION_TIME_TO_LIVE - configurable Session TTL.

Let me know if that help you to find your way. :)

ModischFabrications commented 3 years ago

Good news: I set the session time to 5min and it seems like the ConnectionReset is gone.

Bad news: From time to time the bot shows a collision with another instance without me actually starting another one. This happened on u2 as well, I just thought it was human error. I will doublecheck that it isn't a human error, nonetheless all the other fixes are looking good.

``` 2021-01-16 23:56:06,019 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-16 23:56:06,019 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:56:06,019 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:56:06,019 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023013, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:56:26,045 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-16 23:56:26,045 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-16 23:56:26,045 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:56:26,045 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:56:26,045 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023013, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:56:46,073 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-16 23:56:46,073 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-16 23:56:46,073 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:56:46,073 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:56:46,073 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023013, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:06,098 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-16 23:57:06,098 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-16 23:57:06,098 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:57:06,098 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:06,099 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023013, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:15,352 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:57:15,354 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:57:15,354 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:57:15,354 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry" 2021-01-16 23:57:15,613 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:15,613 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023013, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:18,914 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:57:18,914 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:57:18,914 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:57:18,914 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.5 seconds until retry" 2021-01-16 23:57:19,417 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:19,417 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023013, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:22,963 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:57:22,963 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:57:22,964 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:57:22,964 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 1.0 seconds until retry" 2021-01-16 23:57:23,979 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:23,979 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023013, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:28,030 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:57:28,030 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:57:28,030 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:57:28,030 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 2.0 seconds until retry" 2021-01-16 23:57:30,045 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:30,045 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023013, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:32,440 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[{"update_id":347023013,\n"message":{"message_id":3546,"from":{"id":1013389120,"is_bot":false,"first_name":"Johannes","language_code":"de"},"chat":{"id":1013389120,"first_name":"Johannes","type":"private"},"date":1610837853,"text":"/commands","entities":[{"offset":0,"length":9,"type":"bot_command"}]}}]}''" 2021-01-16 23:57:32,440 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 1 new updates" 2021-01-16 23:57:32,440 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:57:32,440 (util.py:66 WorkerThread1) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:32,441 (apihelper.py:76 WorkerThread1) DEBUG - TeleBot: "Request: method=post url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/sendMessage params={'chat_id': '1013389120', 'text': 'What do you want me to do?', 'reply_markup': '{"keyboard": [[{"text": "/status"}, {"text": "/players"}], [{"text": "/start_server"}, {"text": "/stop_server"}]]}'} files=None" 2021-01-16 23:57:32,441 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:32,441 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023014, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:32,588 (apihelper.py:130 WorkerThread1) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":{"message_id":3547,"from":{"id":YYY,"is_bot":true,"first_name":"ModischMinecraftBot","username":"ModischMinecraftBot"},"chat":{"id":1013389120,"first_name":"Johannes","type":"private"},"date":1610837853,"text":"What do you want me to do?"}}''" 2021-01-16 23:57:32,588 (util.py:70 WorkerThread1) DEBUG - TeleBot: "Task complete" 2021-01-16 23:57:35,097 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:57:35,097 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:57:35,098 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:57:35,098 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry" 2021-01-16 23:57:35,356 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:35,356 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023014, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:36,732 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[{"update_id":347023014,\n"message":{"message_id":3548,"from":{"id":1013389120,"is_bot":false,"first_name":"Johannes","language_code":"de"},"chat":{"id":1013389120,"first_name":"Johannes","type":"private"},"date":1610837858,"text":"/start","entities":[{"offset":0,"length":6,"type":"bot_command"}]}}]}''" 2021-01-16 23:57:36,732 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 1 new updates" 2021-01-16 23:57:36,732 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:57:36,733 (util.py:66 WorkerThread2) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:36,733 (apihelper.py:76 WorkerThread2) DEBUG - TeleBot: "Request: method=post url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/sendMessage params={'chat_id': '1013389120', 'text': 'Greetings Johannes, your are op!'} files=None" 2021-01-16 23:57:36,733 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:36,733 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023015, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:36,838 (apihelper.py:130 WorkerThread2) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":{"message_id":3549,"from":{"id":YYY,"is_bot":true,"first_name":"ModischMinecraftBot","username":"ModischMinecraftBot"},"chat":{"id":1013389120,"first_name":"Johannes","type":"private"},"date":1610837858,"text":"Greetings Johannes, your are op!"}}''" 2021-01-16 23:57:36,838 (apihelper.py:76 WorkerThread2) DEBUG - TeleBot: "Request: method=post url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/sendMessage params={'chat_id': '1013389120', 'text': 'I can start and stop a minecraft server for you.\nSend /start to get this message again.\n'} files=None" 2021-01-16 23:57:36,886 (apihelper.py:130 WorkerThread2) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":{"message_id":3550,"from":{"id":YYY,"is_bot":true,"first_name":"ModischMinecraftBot","username":"ModischMinecraftBot"},"chat":{"id":1013389120,"first_name":"Johannes","type":"private"},"date":1610837858,"text":"I can start and stop a minecraft server for you.\\nSend /start to get this message again.","entities":[{"offset":54,"length":6,"type":"bot_command"}]}}''" 2021-01-16 23:57:36,886 (apihelper.py:76 WorkerThread2) DEBUG - TeleBot: "Request: method=post url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/sendMessage params={'chat_id': '1013389120', 'text': 'What do you want me to do?', 'reply_markup': '{"keyboard": [[{"text": "/status"}, {"text": "/players"}], [{"text": "/start_server"}, {"text": "/stop_server"}]]}'} files=None" 2021-01-16 23:57:36,939 (apihelper.py:130 WorkerThread2) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":{"message_id":3551,"from":{"id":YYY,"is_bot":true,"first_name":"ModischMinecraftBot","username":"ModischMinecraftBot"},"chat":{"id":1013389120,"first_name":"Johannes","type":"private"},"date":1610837858,"text":"What do you want me to do?"}}''" 2021-01-16 23:57:36,939 (util.py:70 WorkerThread2) DEBUG - TeleBot: "Task complete" 2021-01-16 23:57:38,314 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[{"update_id":347023015,\n"message":{"message_id":3552,"from":{"id":1013389120,"is_bot":false,"first_name":"Johannes","language_code":"de"},"chat":{"id":1013389120,"first_name":"Johannes","type":"private"},"date":1610837859,"text":"/status","entities":[{"offset":0,"length":7,"type":"bot_command"}]}}]}''" 2021-01-16 23:57:38,314 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 1 new updates" 2021-01-16 23:57:38,314 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:57:38,314 (util.py:66 WorkerThread2) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:38,314 (apihelper.py:76 WorkerThread2) DEBUG - TeleBot: "Request: method=post url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/sendMessage params={'chat_id': '1013389120', 'text': 'Server status is [querying]..'} files=None" 2021-01-16 23:57:38,314 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:38,314 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:38,357 (apihelper.py:130 WorkerThread2) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":{"message_id":3553,"from":{"id":YYY,"is_bot":true,"first_name":"ModischMinecraftBot","username":"ModischMinecraftBot"},"chat":{"id":1013389120,"first_name":"Johannes","type":"private"},"date":1610837859,"text":"Server status is [querying].."}}''" 2021-01-16 23:57:38,474 (apihelper.py:76 WorkerThread2) DEBUG - TeleBot: "Request: method=post url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/editMessageText params={'text': 'Server is online with 1/5 players (22ms)', 'chat_id': 1013389120, 'message_id': 3553} files=None" 2021-01-16 23:57:38,559 (apihelper.py:130 WorkerThread2) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":{"message_id":3553,"from":{"id":YYY,"is_bot":true,"first_name":"ModischMinecraftBot","username":"ModischMinecraftBot"},"chat":{"id":1013389120,"first_name":"Johannes","type":"private"},"date":1610837859,"edit_date":1610837859,"text":"Server is online with 1/5 players (22ms)"}}''" 2021-01-16 23:57:38,559 (util.py:70 WorkerThread2) DEBUG - TeleBot: "Task complete" 2021-01-16 23:57:42,411 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:57:42,411 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:57:42,411 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:57:42,411 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry" 2021-01-16 23:57:42,674 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:42,674 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:57:53,741 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:57:53,742 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:57:53,742 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:57:53,742 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.5 seconds until retry" 2021-01-16 23:57:54,256 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:57:54,256 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:58:13,313 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:58:13,314 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:58:13,314 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:58:13,314 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 1.0 seconds until retry" 2021-01-16 23:58:14,322 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:58:14,322 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:58:34,351 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-16 23:58:34,351 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-16 23:58:34,351 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:58:34,351 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:58:34,351 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:58:49,411 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:58:49,411 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:58:49,411 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:58:49,411 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry" 2021-01-16 23:58:49,671 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:58:49,671 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:59:09,703 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-16 23:59:09,703 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-16 23:59:09,703 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:59:09,704 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:59:09,704 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:59:29,730 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-16 23:59:29,730 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-16 23:59:29,730 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:59:29,730 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:59:29,730 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:59:49,759 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-16 23:59:49,760 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-16 23:59:49,760 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-16 23:59:49,760 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:59:49,760 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-16 23:59:56,771 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-16 23:59:56,771 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-16 23:59:56,772 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-16 23:59:56,772 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry" 2021-01-16 23:59:57,023 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-16 23:59:57,023 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:00:17,048 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:00:17,048 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:00:17,048 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:00:17,048 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:00:17,048 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:00:37,081 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:00:37,081 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:00:37,081 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:00:37,081 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:00:37,081 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:00:57,109 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:00:57,109 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:00:57,109 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:00:57,110 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:00:57,110 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:01:17,140 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:01:17,141 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:01:17,141 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:01:17,141 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:01:17,141 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:01:37,170 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:01:37,170 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:01:37,170 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:01:37,170 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:01:37,170 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:01:57,209 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:01:57,209 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:01:57,209 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:01:57,209 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:01:57,210 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:02:08,189 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-17 00:02:08,190 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-17 00:02:08,190 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-17 00:02:08,190 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry" 2021-01-17 00:02:08,446 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:02:08,446 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:02:28,484 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:02:28,485 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:02:28,485 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:02:28,485 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:02:28,485 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:02:48,513 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:02:48,513 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:02:48,513 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:02:48,514 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:02:48,514 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:03:08,541 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:03:08,541 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:03:08,541 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:03:08,541 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:03:08,541 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:03:28,578 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:03:28,578 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:03:28,578 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:03:28,578 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:03:28,578 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:03:48,602 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:03:48,602 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:03:48,602 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:03:48,602 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:03:48,602 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:04:08,641 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:04:08,641 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:04:08,641 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:04:08,641 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:04:08,641 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:04:28,675 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:04:28,676 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:04:28,676 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:04:28,676 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:04:28,676 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:04:48,699 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:04:48,700 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:04:48,700 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:04:48,700 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:04:48,700 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:05:08,724 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:05:08,724 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:05:08,724 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:05:08,724 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:05:08,724 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:05:28,834 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:05:28,834 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:05:28,834 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:05:28,835 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:05:28,835 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:05:48,864 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:05:48,864 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:05:48,864 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:05:48,864 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:05:48,864 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:06:08,887 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:06:08,887 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:06:08,887 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:06:08,887 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:06:08,887 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:06:27,604 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-17 00:06:27,604 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-17 00:06:27,606 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-17 00:06:27,606 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry" 2021-01-17 00:06:27,862 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:06:27,862 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:06:47,887 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:06:47,887 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:06:47,887 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:06:47,888 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:06:47,888 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:07:07,911 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:07:07,911 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:07:07,911 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:07:07,911 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:07:07,911 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:07:27,934 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:07:27,935 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:07:27,935 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:07:27,935 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:07:27,935 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:07:47,963 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:07:47,963 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:07:47,963 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:07:47,963 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:07:47,963 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:08:07,990 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:08:07,990 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:08:07,990 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:08:07,991 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:08:07,991 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:08:28,015 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:08:28,015 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:08:28,015 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:08:28,016 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:08:28,016 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:08:48,041 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:08:48,042 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:08:48,042 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:08:48,042 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:08:48,042 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:09:08,066 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:09:08,067 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:09:08,067 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:09:08,067 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:09:08,067 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:09:28,091 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:09:28,091 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:09:28,091 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:09:28,092 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:09:28,092 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:09:48,115 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:09:48,116 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:09:48,116 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:09:48,116 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:09:48,116 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:10:08,142 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:10:08,142 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:10:08,142 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:10:08,143 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:10:08,143 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:10:28,166 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:10:28,166 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:10:28,166 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:10:28,166 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:10:28,166 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:10:48,309 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:10:48,309 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:10:48,309 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:10:48,309 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:10:48,309 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:11:08,339 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:11:08,339 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:11:08,339 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:11:08,339 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:11:08,340 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:11:28,368 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:11:28,368 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:11:28,368 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:11:28,369 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:11:28,369 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:11:48,400 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:11:48,400 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:11:48,400 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:11:48,400 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:11:48,400 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:12:08,426 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:12:08,426 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:12:08,426 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:12:08,427 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:12:08,427 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:12:28,454 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:12:28,454 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:12:28,454 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:12:28,455 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:12:28,455 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:12:48,485 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:12:48,485 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:12:48,485 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:12:48,485 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:12:48,485 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:13:08,517 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:13:08,517 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:13:08,517 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:13:08,517 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:13:08,517 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:13:28,549 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:13:28,549 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:13:28,549 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:13:28,549 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:13:28,549 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:13:48,582 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:13:48,582 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:13:48,582 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:13:48,582 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:13:48,582 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:14:08,618 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:14:08,618 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:14:08,618 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:14:08,618 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:14:08,618 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:14:28,650 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:14:28,650 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:14:28,650 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:14:28,650 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:14:28,650 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:14:48,678 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:14:48,678 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" 2021-01-17 00:14:48,678 (util.py:70 PollingThread) DEBUG - TeleBot: "Task complete" 2021-01-17 00:14:48,679 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:14:48,679 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:15:02,995 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''" 2021-01-17 00:15:02,995 (util.py:75 PollingThread) DEBUG - TeleBot: "ApiTelegramException occurred, args=('A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running',) Traceback (most recent call last): File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\util.py", line 69, in run task(*args, **kwargs) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 322, in __retrieve_updates updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout, long_polling_timeout = long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\__init__.py", line 292, in get_updates json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 281, in get_updates return _make_request(token, method_url, params=payload) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 132, in _make_request json_result = _check_result(method_name, result) File "C:\Users\MMF\.virtualenvs\MineGramBot-7yiiMmm7\lib\site-packages\telebot\apihelper.py", line 159, in _check_result raise ApiTelegramException(method_name, result, result_json) telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running " 2021-01-17 00:15:02,997 (__init__.py:515 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running" 2021-01-17 00:15:02,997 (__init__.py:522 MainThread) INFO - TeleBot: "Waiting for 0.25 seconds until retry" 2021-01-17 00:15:03,252 (util.py:66 PollingThread) DEBUG - TeleBot: "Received task" 2021-01-17 00:15:03,252 (apihelper.py:76 PollingThread) DEBUG - TeleBot: "Request: method=get url=https://api.telegram.org/botYYY:AAG0XXXBC_QY/getUpdates params={'offset': 347023016, 'connect-timeout': 20, 'long_polling_timeout': 20} files=None" 2021-01-17 00:15:23,276 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":true,"result":[]}''" 2021-01-17 00:15:23,276 (__init__.py:327 PollingThread) DEBUG - TeleBot: "Received 0 new updates" ```
ModischFabrications commented 3 years ago

Oh crap, I see the problem now, the bot ID and secret token is printed in plaintext in the logs. I requested a new token, this will fix both a forgotten running instance and someone else trying to misuse my token.

Im going to test it with a long running instance tomorrow, but I think all those bugs should be resolved now :)

Badiboy commented 3 years ago

2021-01-16 23:57:15,352 (apihelper.py:130 PollingThread) DEBUG - TeleBot: "The server returned: 'b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}''"

Yep, I don't like this. "We need to go deeper" (c)

I set the session time to 5min

Please check: did you really set it for 5 minutes (SESSION_TIME_TO_LIVE = 300)? Not to 5?

ModischFabrications commented 3 years ago

I checked, seems to be correct.

...
apihelper.ENABLE_MIDDLEWARE = True
apihelper.SESSION_TIME_TO_LIVE = 5 * 60
bot = telebot.TeleBot(config.TOKEN)
...

I will doublecheck that it isn't a human error

I'm pretty certain that it was a human error, requesting a new token (due to the assumed leak from the log) seems to have fixed it. I will test more extensively tomorrow, but everything should be resolved.

Badiboy commented 3 years ago

OK, thank you. Seems that we are very close to the victory. :)

ModischFabrications commented 3 years ago

I haven't found any more occurrences of the bugs, which means we were victorious at last 🎉

I am happy that we were able to find and fix all these issues. I will send in another pull request with additions (bot reference and apihelper settings) once the new version is released and I was able to finish my bot.

Feel free to close this issue.

Badiboy commented 3 years ago

Gratz. 👍

AlexanderSurbashev commented 1 year ago

Seems that I got it.

Try the GIT version. pip install -U git+https://github.com/eternnoir/pyTelegramBotAPI.git Version should be 3.7.5.u1.

THX!! it save my day.