Answer the question
In order to leave comments, you need to log in
__init__() got an unexpected keyword argument 'language' How to fix it?
from pyowm import OWM
owm = OWM ('', language = 'ru')
plac = input('В каком городе/стране?')
w.get_detailed_status()
mgr = owm.weather_manager()
observation = mgr.weather_at_place(plac)
w = observation.weather
owm = OWM ('', language = 'ru')
TypeError: __init__() got an unexpected keyword argument 'language'
Answer the question
In order to leave comments, you need to log in
from pyowm.owm import OWM
from pyowm.utils.config import get_default_config
from pyowm.utils import config
from pyowm.utils import timestamps
config_dict = get_default_config()
posto = input("In which city do you want to know the weather?")
owm = OWM( 'your api', config_dict)
config_dict['language'] = 'ru'
mgr = owm.weather_manager()
observation = mgr.weather_at_place(posto)
w = observation.weather
print(w)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question