используя этот код получается что он отправляет в группу сообщение с этой строки bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id,
text="Введите ник", reply_markup=keyboard)
if __name__ == "__main__":
bot.polling(none_stop=True)
Вот полный список ошибки:
2020-08-06 02:14:48,154 (util.py:68 WorkerThread2) ERROR - TeleBot: "AttributeError occurred, args=("'NoneType' object has no attribute 'chat'",)
Traceback (most recent call last):
File "C:\Users\99455\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 62, in run
task(*args, **kwargs)
File "C:/Users/99455/PycharmProjects/untitled3/main.py", line 67, in handle_text
msg = "Пользователь {} написал \"{}\".".format(message.chat.id, message.messag_id)
AttributeError: 'NoneType' object has no attribute 'chat'
"
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\JetBrains\PyCharm Community Edition 2020.1.2\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2020.1.2\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/99455/PycharmProjects/untitled3/main.py", line 91, in
bot.polling(none_stop=True)
File "C:\Users\99455\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 427, in polling
self.__threaded_polling(none_stop, interval, timeout)
File "C:\Users\99455\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\__init__.py", line 451, in __threaded_polling
self.worker_pool.raise_exceptions()
File "C:\Users\99455\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 111, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "C:\Users\99455\AppData\Local\Programs\Python\Python38-32\lib\site-packages\six.py", line 693, in reraise
raise value
File "C:\Users\99455\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 62, in run
task(*args, **kwargs)
File "C:/Users/99455/PycharmProjects/untitled3/main.py", line 67, in handle_text
msg = "Пользователь {} написал \"{}\".".format(message.chat.id, message.messag_id)
AttributeError: 'NoneType' object has no attribute 'chat'
text="Введите ник", reply_markup=keyboard)