bad location_id for Google

Bug #952478 reported by Tomasz Maciejewski
20
This bug affects 3 people
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_details[loc_ids[valid_source]],
---
> self.location_details['label'],

This worked like charm.

description: updated
Revision history for this message
Vadim Rutkovsky (roignac) wrote :

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

Changed in weather-indicator:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.