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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotutil.py", line 69, in run
task(*args, **kwargs)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__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:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebot__init__.py", line 292, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 281, in get_updates
return _make_request(token, method_url, params=payload)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.py", line 132, in _make_request
json_result = _check_result(method_name, result)
File "C:UsersMMF.virtualenvsMineGramBot-7yiiMmm7libsite-packagestelebotapihelper.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"
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/telebot/__init__.py", line 581, in infinity_polling
self.polling(none_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "/usr/local/lib/python3.8/dist-packages/telebot/__init__.py", line 629, in polling
self.__threaded_polling(non_stop, interval, timeout, long_polling_timeout, allowed_updates)
File "/usr/local/lib/python3.8/dist-packages/telebot/__init__.py", line 691, in __threaded_polling
raise e
File "/usr/local/lib/python3.8/dist-packages/telebot/__init__.py", line 650, in __threaded_polling
polling_thread.raise_exceptions()
File "/usr/local/lib/python3.8/dist-packages/telebot/util.py", line 107, in raise_exceptions
raise self.exception_info
File "/usr/local/lib/python3.8/dist-packages/telebot/util.py", line 89, in run
task(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/telebot/__init__.py", line 371, in __retrieve_updates
updates = self.get_updates(offset=(self.last_update_id + 1),
File "/usr/local/lib/python3.8/dist-packages/telebot/__init__.py", line 349, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "/usr/local/lib/python3.8/dist-packages/telebot/apihelper.py", line 328, in get_updates
return _make_request(token, method_url, params=payload)
File "/usr/local/lib/python3.8/dist-packages/telebot/apihelper.py", line 152, in _make_request
result = _get_req_session().request(
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 431, in send
raise ValueError(err)
ValueError: Invalid timeout (True, 25). Pass a (connect, read) timeout tuple, or a single float to set both timeouts to the same value
"
Python — AsyncTeleBot polling timeout error
Running this python script in a bash console:
import asyncio
from telebot.async_telebot import AsyncTeleBot
bot = AsyncTeleBot(SECRET_TOKEN)
asyncio.run(bot.infinity_polling())
This error message is printed to the console repeatedly every 2 seconds, regardless of the timeout parameter.
(async_telebot.py:321 MainThread) ERROR - TeleBot: "Request timeout. Request: method=get url=getUpdates params=<aiohttp.formdata.FormData object at 0x7f0c35d9b7f0> files=None request_timeout=20"
The same script works well when run locally, or if I used TeleBot instead of AsyncTeleBot (I need it to be asyncronous)
I have tried the following, but still facing the same issue
- setting timeout and request_timeout parameters
- using bot.polling(non_stop=True)
- updating pyTelegramBotAPI
Would appreciate any assistance in resolving this issue!
sinstarzs
|
4
posts
|
Dec. 14, 2022, 2 p.m.
|
permalink
Updating pyTelegramBotAPI to 4.8.0 resulted in a similar error:
2022-12-14 17:11:34,999 (asyncio_helper.py:101 MainThread) ERROR - TeleBot: "Aiohttp ClientError: ClientConnectorError"
2022-12-14 17:11:34,999 (async_telebot.py:361 MainThread) ERROR - TeleBot: "Infinity polling exception: Request timeout. Request: method=get url=getMe params=<aiohttp.formdata.FormData object at 0x7f003abe6520> files=None request_timeout=300"
2022-12-14 17:11:35,000 (async_telebot.py:363 MainThread) ERROR - TeleBot: "Exception traceback:
Traceback (most recent call last):
File "/home/sinstarzs/.local/lib/python3.9/site-packages/telebot/async_telebot.py", line 357, in infinity_polling
await self._process_polling(non_stop=True, timeout=timeout, request_timeout=request_timeout,
File "/home/sinstarzs/.local/lib/python3.9/site-packages/telebot/async_telebot.py", line 397, in _process_polling
self._user = await self.get_me()
File "/home/sinstarzs/.local/lib/python3.9/site-packages/telebot/async_telebot.py", line 1899, in get_me
result = await asyncio_helper.get_me(self.token)
File "/home/sinstarzs/.local/lib/python3.9/site-packages/telebot/asyncio_helper.py", line 154, in get_me
return await _process_request(token, method_url)
File "/home/sinstarzs/.local/lib/python3.9/site-packages/telebot/asyncio_helper.py", line 105, in _process_request
raise RequestTimeout("Request timeout. Request: method={0} url={1} params={2} files={3} request_timeout={4}".format(method, url, params, files, request_timeout, current_try))
telebot.asyncio_helper.RequestTimeout: Request timeout. Request: method=get url=getMe params=<aiohttp.formdata.FormData object at 0x7f003abe6520> files=None request_timeout=300
sinstarzs
|
4
posts
|
Dec. 14, 2022, 5:15 p.m.
|
permalink
Telegram API is whitelisted, and this script works when I run with Telebot instead of AsyncTeleBot
sinstarzs
|
4
posts
|
Dec. 15, 2022, 2:27 p.m.
|
permalink
That’s why I’m suggesting checking proxy settings. Free accounts connect to whitelisted sites via proxy.
fjl
|
3651
posts
|
PythonAnywhere staff
|
Dec. 15, 2022, 4:18 p.m.
|
permalink
It works after adding this. Thanks!
from telebot import asyncio_helper
asyncio_helper.proxy = 'http://proxy.server:3128'
sinstarzs
|
4
posts
|
Dec. 15, 2022, 5:43 p.m.
|
permalink
Excellent, thanks for confirming!
giles
|
11190
posts
|
PythonAnywhere staff
|
Dec. 16, 2022, 12:38 a.m.
|
permalink
That https://stackoverflow.com/a/5284038/13909139 shows a way to smooth the curves of the lines.
It just doesn’t look much like the excel.You will need to install the library scipy.#imagem7 amostra36 AFM
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import matplotlib.ticker as tkr
para suavizar as linhas
from scipy.interpolate import make_interp_spline, BSpline
def func(x, pos): # formatter function takes tick label and tick position
s = str(x)
ind = s.index(‘.’)
return s[:ind] + ‘,’ + s[ind+1:] # change dot to comma
x_format = tkr.FuncFormatter(func)
plt.rcParams[«figure.figsize»] = [14.5,10]
fig, ax =plt.subplots()
ax.xaxis.set_major_formatter(x_format)
ax.yaxis.set_major_formatter(x_format)
df = pd.read_excel(‘AFMimagem7amostra36.xlsx’, header=None, usecols=[0,1,2,3,4,5,6], names=[‘A’, ‘B’, ‘C’, ‘D’,’E’,’F’])
def smooth_line_points(x, y):
x_smooth = np.linspace(x.min(), x.max(), 300)
spl = make_interp_spline(x, y, k=3)
y_smooth = spl(x_smooth)
return x_smooth, y_smooth
dA, dB = smooth_line_points(df[‘A’], df[‘B’])
colorAB = «Black»
ax.plot(dA, dB, label=’T. «fria»=340 ºC’, linestyle=’-‘, linewidth=2, color=colorAB)
coloca uma marca em cada posição dos dados originais
markers_xy = [df[‘A’], df[‘B’]]
ax.scatter(markers_xy[0], markers_xy[1], c=colorAB, marker=’o’, s=25)
ax.plot(df[‘C’], df[‘D’], label=’_T. «fria»=340 ºC’, linestyle=’-‘, linewidth=2, marker=’o’, color=’Red’, markersize=5)
ax.plot(df[‘E’], df[‘F’], label=’_T. «fria»=340 ºC’, linestyle=’-‘, linewidth=2, marker=’o’, color=’Red’, markersize=5)
ax.yaxis.grid(b=True, color=’black’, alpha=0.3, linestyle=’-.’, linewidth=1)
ax.xaxis.grid(b=True, color=’black’, alpha=0.3, linestyle=’-.’, linewidth=1)
ax.set_xlabel(‘x ($mu$m)’, fontsize=40)
ax.tick_params(axis=’x’, pad=15)
plt.yticks(np.arange(-1.8,-0.3,0.1).round(decimals=1))
ax.set_ylabel(‘Altura (nm)’, fontsize=40)
plt.rc(‘xtick’, labelsize=30)
plt.rc(‘ytick’, labelsize=30)
plt.show()
#plt.savefig(‘output.png’, dpi=500, bbox_inches=’tight’)
bot.download_file causes Aiohttp ClientError: ClientOSError on the next message
Please answer these questions before submitting your issue. Thanks!
- What version of pyTelegramBotAPI are you using?
4.6.0, 4.6.1, 4.7.0 - What OS are you using?
win, lin - What version of python are you using?
3.10
Hi.
Here is small bot demonstrates the problem:
import asyncio
from telebot.async_telebot import AsyncTeleBot
TOKEN = '**********'
bot = AsyncTeleBot(TOKEN)
@bot.message_handler(commands=['id'])
async def id_command(message):
return await bot.reply_to(message, text=f'Your id: {message.chat.id}')
@bot.message_handler(content_types=['photo'])
async def photo_handler(message):
file_id = message.photo[-1].file_id
file_info = await bot.get_file(file_id)
# This download method causes:
# Aiohttp ClientError: ClientOSError and then
# Request timeout. Request: .... and then
# Infinity polling: polling exited
# on the next message
_file = await bot.download_file(file_info.file_path)
return await bot.reply_to(message, f'Path: {file_info.file_path}; Length:{len(_file)}' )
if __name__ == '__main__':
loop = asyncio.new_event_loop()
# Not recovering with infinity_polling: await self._process_polling(non_stop=False....
# Version 4.6.0 recovering after Aiohttp ClientError
# Version 4.6.1 and 4.7.0 not recovering
loop.create_task(bot.infinity_polling())
# Recovering:
# loop.create_task(bot.polling(non_stop=True))
loop.run_forever()
# The scenario:
# - bot is run
# - send /id command and get reply
# - send any image file and get the filename and file length
# - send /id and get polling exited with:
# (asyncio_helper.py:80 MainThread) ERROR - TeleBot: "Aiohttp ClientError: ClientOSError"
# (async_telebot.py:317 MainThread) ERROR - TeleBot: "Request timeout. Request: method=get url=getUpdates params=<aiohttp.formdata.FormData object at 0x0000025A91E391E0> files=None request_timeout=None"
# (async_telebot.py:276 MainThread) ERROR - TeleBot: "Infinity polling: polling exited"
# (async_telebot.py:278 MainThread) ERROR - TeleBot: "Break infinity polling"
Try to download my github version using:
pip3 install git+https://github.com/coder2020official/pyTelegramBotAPI.git@downloadfile
- replace pip3 to pip if necessary.
Btw, download_file will return you bytes object. You’ll need to open a file and write the content if necessary
Btw, download_file will return you bytes object. You’ll need to open a file and write the content if necessary
Sure, and in real bot I do. This is just demonstration code.