Пишу код на Бота в Телеграмме. Когда пытаюсь начать работать с ним, то выдает ошибку, также будет прикреплен скриншот кода(1), проблем(2). Run будет текстом.
1. 2. MainThread) ERROR - TeleBot: "Threaded polling exception: 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"
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
1. 2.
MainThread) ERROR - TeleBot: "Threaded polling exception: 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"
2023-05-31 16:42:20,918 (__init__.py:1085 MainThread) ERROR - TeleBot: "Exception traceback:
Traceback (most recent call last):
File "C:\Users\illka\AppData\Local\Programs\Python\Python311\SuperUchenikiBot\lib\site-packages\telebot\__init__.py", line 1073, in __threaded_polling
polling_thread.raise_exceptions()
File "C:\Users\illka\AppData\Local\Programs\Python\Python311\SuperUchenikiBot\lib\site-packages\telebot\util.py", line 108, in raise_exceptions
raise self.exception_info
File "C:\Users\illka\AppData\Local\Programs\Python\Python311\SuperUchenikiBot\lib\site-packages\telebot\util.py", line 90, in run
task(*args, **kwargs)
File "C:\Users\illka\AppData\Local\Programs\Python\Python311\SuperUchenikiBot\lib\site-packages\telebot\__init__.py", line 649, in __retrieve_updates
updates = self.get_updates(offset=(self.last_update_id + 1),
File "C:\Users\illka\AppData\Local\Programs\Python\Python311\SuperUchenikiBot\lib\site-packages\telebot\__init__.py", line 623, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "C:\Users\illka\AppData\Local\Programs\Python\Python311\SuperUchenikiBot\lib\site-packages\telebot\apihelper.py", line 321, in get_updates
return _make_request(token, method_url, params=payload)
File "C:\Users\illka\AppData\Local\Programs\Python\Python311\SuperUchenikiBot\lib\site-packages\telebot\apihelper.py", line 162, in _make_request
json_result = _check_result(method_name, result)
File "C:\Users\illka\AppData\Local\Programs\Python\Python311\SuperUchenikiBot\lib\site-packages\telebot\apihelper.py", line 189, 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
"
Process finished with exit code 0