AttributeError: 'TeleBot' object has no attribute 'message_handler
Делаю телеграмм бота выводится ошибка : Traceback (most recent call last): File "D:\Users\Влад\PycharmProjects\pythonProject\venv\bot.py", line 12, in @bot.message_handler(content_types=['text']) AttributeError: 'TeleBot' object has no attribute 'message_handler'
Код:
import pyowm
from pyowm import OWM
from pyowm.utils import config as cfg
config = cfg.get_default_config()
config['language'] = 'ru'
owm = OWM('09f45175cd7f8d2848c9b3c1e59f1780', config)
import telebot;
bot = telebot.TeleBot("__");
@bot.message_handler(content_types=['text'])
def send_echo(message):
observation = mgr.weather_at_place(message.text)
w = observation.weather
temp = w.temperature('celsius')['temp']
answer = 'В гоороде ' + message.text + ' ' + 'сейчас ' + w.detailed_status + '\n'
answer += 'Температура сейчас: ' + str(temp) + '\n\n'
bot.send_message(message.chat.id, answer)
bot.polling(none_stop=True)