'OWM' object has no attribute 'expextions'

Здраствуйте, заранее благодарю тех кто поможет. Я новенький в python (3 дня) и попытался сделать бота в телеграме, написал код и выдаёт эту ошибку. Можете помочь пожалуйста?

from pyowm import OWM
import telebot

owm= OWM('my api key')
bot = telebot.TeleBot('Token')

@bot.message_handler(content_types=['text'])
def send_echo(message):
 try:
  observation = owm.weather_at_place(message.text)
  w = observation.get_weather()
  temp=w.get_temperature('celsius')['temp']

  answer = f"В городе {message.text} сейчас {w.get_detailed_status()} \n"
  answer += f"Температура в районе {round(temp)} градусов\n\n"

if temp<10:
  answer += 'Очень холодно, одевай пуховик.'
elif temp<15:
  answer += 'Холодно, лучше оденься.'
else:
  answer += 'Жарко, иди хоть в трусах.'

   bot.send_message(message.chat.id, answer)
 except pyowm.exceptions.api_response_error.NotFoundError:
    bot.send_message(message.chat.id, 'Город не найден :(')
  

bot.polling(none_stop = True)

Ошибка: 'OWM' object has no attribute 'expextions'


Ответы (1 шт):

Автор решения: SmellyNS

Полагаю, вы опечатались

expextions -> expections

Ошибка говорит о том, что объект класса OWM не имеет аттрибута или метода с названием expextions, который вы пытаетесь вызвать.

→ Ссылка