Answer the question
In order to leave comments, you need to log in
How to change language in Pyowm (doesn't work via config)?
Ku, here is the code:
config_dict = get_config_from('config.json')
owm = pyowm.OWM('ed3d1e950f0d1e73b26cfd7f55fbb4f9', config_dict)
mgr = owm.weather_manager()
observation = mgr.weather_at_place(city)
w = observation.weather
l = w.temperature('celsius')['temp']
nt = w.temperature('celsius')['temp_min']
xt = w.temperature('celsius')['temp_max']
temp = str(l) + " °C"
answer = w.status
hum = w.humidity
mmr = str(hum) + "%"
self.ids.res.text = str(temp)
self.ids.res1.text = str(t_min + "/" + t_max)
self.ids.res2.text = str(mmr)
self.ids.res3.text = str(answer)
{
"api_key": "ed3d1e950f0d1e73b26cfd7f55fbb4f9",
"subscription_type": "free",
"language": "ru",
"connection": {
"use_ssl": true,
"use_proxy": false,
"verify_ssl_certs": true,
"timeout_secs": 1
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question