I've been following the instructions for this worksheet, and I'm having problems with the rain.
Every location I check (even places where it's been storming) the rainfall always comes back as 0. Is there a way to fix this?
Code: Select all
import pyowm owm = pyowm.OWM('ed2fredactedapikeyc500206b3fbde4') # You MUST provide your valid API key observation = owm.weather_at_place('Basingstoke,uk') ## CHANGE ME ## weather = observation.get_weather() print(weather) rain = weather.get_rain() wind = weather.get_wind() humidity = weather.get_humidity() temp = weather.get_temperature('celsius') print ("Rain:", rain, " Wind:", wind, " Humidity:", humidity, "Temp:", temp)
Users browsing this forum: No registered users and 43 guests