N
N
nikitkasablin2020-06-19 19:43:43
Python
nikitkasablin, 2020-06-19 19:43:43

__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

Gives an error message

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

3 answer(s)
S
soremix, 2020-06-19
@SoreMix

owm = OWM ('9973e6a53b426c134abbe4abbceceaca', {'language': 'ru'})

R
RyderWilson, 2021-05-15
@RyderWilson

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)

H
Heafy, 2014-09-04
@Heafy

Your system does not have the bit depth.
You need to find the same application for 64-bit windows, or run the application with 32(86)-bit windows.
You can read more about bit depth here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question