X
X
Xacker_Name2021-08-14 16:30:41
Python
Xacker_Name, 2021-08-14 16:30:41

Why does it say that there is no message_handler attribute in telebot?

When I try to run the bot on telebot, I get the following error:

Traceback (most recent call last):
  File "/root/SpamTG/main.py", line 17, in <module>
    @bot.message_handler(commands=["start"])
AttributeError: 'TeleBot' object has no attribute 'message_handler'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2021-08-14
@rt2233

You decide what you have installed from the libraries:
https://pypi.org/project/telebot/
https://pypi.org/project/pyTelegramBotAPI/
Judging by the error, there should be pyTelegramBotAPI, and telebot is installed.
First remove telebot and install pyTelegramBotAPI.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question