May-16-2017, 08:59 PM
Could you post the full Traceback? At the moment for your location
forecast.currently().summary
is simply "Clear', so I guess it's not the problem, but some other line where you try to print temperatute with degree sign like daily().summaryimport datetime import forecastio def main(): """ Run load_forecast() with the given lat, lng, and time arguments. """ api_key = "YOUR API KEY" lat = -31.967819 lng = 115.87718 #time = datetime.datetime(2017, 06, 05, 6, 0, 0) forecast = forecastio.load_forecast(api_key, lat, lng) #, time=time) #mysign = MiniSign(devicetype='sign') print "===========Currently Data=========" current_weather = forecast.currently() print current_weather.summary print current_weather.temperature print current_weather.humidity print "===========Hourly Data=========" by_hour = forecast.hourly() print "Hourly Summary: %s" %(by_hour.summary) print "===========Daily Data=========" by_day = forecast.daily() print "Daily Summary: %s" %(by_day.summary) if __name__ == "__main__": main()
Output:===========Currently Data=========
Clear
13.05
0.87
===========Hourly Data=========
Hourly Summary: Clear throughout the day.
===========Daily Data=========
Daily Summary: Light rain on Friday through Monday, with temperatures falling to 15°C on Saturday.