N
N
nikitkasablin2020-06-19 18:48:52
Python
nikitkasablin, 2020-06-19 18:48:52

AttributeError: 'str' object has no attribute 'weather_manager' how to fix?

from pyowm import OWM
owm = OWM ('9973e6a53b426c134abbe4abbceceaca' , language = 'ru' )  

plac = input('В каком городе/стране?')

mgr = owm.weather_manager()
observation = mgr.weather_at_place(plac)
w = observation.weather

print(w)


When I run the program everything is fine, but when I enter the city, this appears in the console

Traceback (most recent call last):
  File "ww.py", line 8, in <module>
    mgr = owm.weather_manager()
AttributeError: 'str' object has no attribute 'weather_manager'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-06-19
@bacon

owm = language = 'ru'
after this, stop writing bots and run to learn the basics
PS where are you all from? How to specify Russian language in PyOWM 3? get some video course

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question