170 похожих чатов

Всем привет. у меня ошибка 2020-07-22 16:51:05,916 (util.py:66 WorkerThread1) ERROR -

TeleBot: "NameError occurred, args=("name 'message' is not defined",)
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/telebot/util.py", line 60, in run
task(*args, **kwargs)
File "main2.py", line 89, in callback_processing
bot.register_next_step_handler(message, outstavkaa)
NameError: name 'message' is not defined
"
2020-07-22 16:51:07,321 (util.py:66 PollingThread) ERROR - TeleBot: "ApiException occurred, args=('A request to the Telegram API was unsuccessful. The server returned HTTP 409 Conflict. Response body:\n[b\'{"ok":false,"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 "/usr/local/lib/python3.7/dist-packages/telebot/util.py", line 60, in run
task(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/telebot/__init__.py", line 279, in __retrieve_updates
updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout)
File "/usr/local/lib/python3.7/dist-packages/telebot/__init__.py", line 249, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates)
File "/usr/local/lib/python3.7/dist-packages/telebot/apihelper.py", line 194, in get_updates
return _make_request(token, method_url, params=payload)
File "/usr/local/lib/python3.7/dist-packages/telebot/apihelper.py", line 60, in _make_request
return _check_result(method_name, result)['result']
File "/usr/local/lib/python3.7/dist-packages/telebot/apihelper.py", line 79, in _check_result
raise ApiException(msg, method_name, result)
telebot.apihelper.ApiException: A request to the Telegram API was unsuccessful. The server returned HTTP 409 Conflict. Response body:
[b'{"ok":false,"error_code":409,"description":"Conflict: terminated by other getUpdates request; make sure that only one bot instance is running"}']
"
^CTraceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/telebot/__init__.py", line 372, in infinity_polling
self.polling(timeout=timeout, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/telebot/__init__.py", line 392, in polling
self.__threaded_polling(none_stop, interval, timeout)
File "/usr/local/lib/python3.7/dist-packages/telebot/__init__.py", line 416, in __threaded_polling
self.worker_pool.raise_exceptions()
File "/usr/local/lib/python3.7/dist-packages/telebot/util.py", line 109, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "/usr/lib/python3/dist-packages/six.py", line 692, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.7/dist-packages/telebot/util.py", line 60, in run
task(*args, **kwargs)
File "main2.py", line 89, in callback_processing
bot.register_next_step_handler(message, outstavkaa)
NameError: name 'message' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main2.py", line 169, in <module>
bot.infinity_polling(True)
File "/usr/local/lib/python3.7/dist-packages/telebot/__init__.py", line 374, in infinity_polling
time.sleep(timeout)
KeyboardInterrupt
^CException ignored in: <module 'threading' from '/usr/lib/python3.7/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 1307, in _shutdown
lock.acquire()
KeyboardInterrupt
код
https://pastebin.com/TiyXe21P
как исправить?

1 ответов

16 просмотров

message = bot.send_message(call.from_user.id, "msg")

Похожие вопросы

Обсуждают сегодня

а через ESC-код ?
Alexey Kulakov
29
30500 за редактор? )
Владимир
47
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
13
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
Как передать управляющий символ в открытую через CreateProcess консоль? Собсна, есть процедура: procedure TRedirectThread.WriteData(Data: OEMString); var Written: Cardinal;...
Serjone
6
в JclConsole объявлено так: function CtrlHandler(CtrlType: DWORD): BOOL; stdcall; - где ваше объявление с stdcall? у вас на картинке нет stdcall
Karagy
8
Ребят в СИ можно реализовать ООП?
Николай
33
program test; {$mode delphi} procedure proc(v: int32); overload; begin end; procedure proc(v: int64); overload; begin end; var x: uint64; begin proc(x); end. Уж не знаю...
notme
6
https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_h_common.erl#L174 https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_olp.erl#L76 15 лет назад...
Maksim Lapshin
20
Карта сайта