bad location_id for Google
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Weather Indicator |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I had problems for a while with the weather for some Polish cities (especially Wrocław). After looking into the log I discovered that the indicator didn't receive any data:
[Fetcher] 2012-03-04 12:32:07,141 - ERROR - Weather: could not get weather icon from report
[Fetcher] 2012-03-04 12:32:07,141 - ERROR - Weather: got data '{}'
[Fetcher] 2012-03-04 12:32:07,141 - ERROR - ExtendedForecast: unknown Google weather condition ''
I could fix that by changing the location_id sent to the Google to the very label displayed in the menu. The fix is one-line change:
443c443
< self.location_
---
> self.location_
This worked like charm.
description: | updated |
Thanks for your help, Tomasz, however I can't include this fix as this is an internal Google Weather API trouble originally.
Google Weather API can search by coordinates (the way we do now in WI) or by city name (the way you are suggesting in this bug). We have been using second option, but Google failed to distinct different cities with the same names (e.g. Paris, France and Paris, Texas, USA) - that is why we used coordinates. This causes much less troubles - however, sometimes Google fails to fecth weather data for some locations using coordinates. So, there is no ultimate solution for this.
TL;DR Google API sucks. In 3.0 version we will remove its support (moving to other specialized secvices as Weather Underground). Hope this makes sense to you