Crashes on forecast view

Bug #743840 reported by Vadim Peretokin
64
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Weather Indicator
Fix Released
High
Felix Lawrence

Bug Description

Using .27, the forecast window does not come up for Toronto.

log:
2011-03-27 16:20:08,007 - INFO - ------------------------------
2011-03-27 16:20:08,008 - INFO - Started Weather Indicator from /usr
2011-03-27 16:20:08,008 - DEBUG - SingleInstance: pid file /tmp/indicator-weather-1000.pid exists
2011-03-27 16:20:08,014 - DEBUG - SingleInstance: pid running
2011-03-27 16:20:08,014 - DEBUG - SingleInstance: writing new pid 19129
2011-03-27 16:20:08,015 - DEBUG - Indicator: creating
2011-03-27 16:20:08,019 - DEBUG - Indicator: reading settings
2011-03-27 16:20:08,020 - DEBUG - Settings: preparing settings store
2011-03-27 16:20:08,226 - DEBUG - Setting: getting value for refresh_rate
2011-03-27 16:20:08,230 - DEBUG - Setting: getting value for unit
2011-03-27 16:20:08,234 - DEBUG - Setting: getting value for notif
2011-03-27 16:20:08,239 - DEBUG - Setting: getting value for wind
2011-03-27 16:20:08,252 - DEBUG - Setting: getting value for data_source
2011-03-27 16:20:08,258 - DEBUG - Setting: getting value for placechosen
2011-03-27 16:20:08,272 - DEBUG - Setting: getting value for places
2011-03-27 16:20:08,277 - DEBUG - Setting: getting value for show_label
2011-03-27 16:20:08,282 - DEBUG - Preferences: got settings: rate=15, unit=S, notif=A, wind=kph, placechosen=0, places=[['4118', 'Toronto']]
2011-03-27 16:20:08,283 - DEBUG - Setting: getting location details for 4118
2011-03-27 16:20:08,287 - DEBUG - Indicator: menu_normal: filling in a menu for found places
2011-03-27 16:20:08,293 - DEBUG - Indicator: update_label: setting label to ''
2011-03-27 16:20:08,294 - DEBUG - Indicator: updateWeather: updating weather for ['4118', 'Toronto']
2011-03-27 16:20:08,295 - DEBUG - Setting: getting cached weather for 4118
2011-03-27 16:20:08,296 - DEBUG - Indicator: getWeather for location 'Toronto, Ontario, Canada'
2011-03-27 16:20:08,296 - DEBUG - Indicator: getWeather: updating weather report
2011-03-27 16:20:08,299 - DEBUG - Indicator: loading weather from cache for ['4118', 'Toronto']
2011-03-27 16:20:08,300 - DEBUG - Indicator: menu_normal: filling in a menu for found places
2011-03-27 16:20:08,312 - DEBUG - Indicator: update_label: setting label to ''
2011-03-27 16:20:08,330 - DEBUG - Indicator: update_label: setting label to '-2 C'
2011-03-27 16:20:09,074 - DEBUG - Weather: current condition: 'partly_cloudy', '('weather-few-clouds', 'weather-few-clouds-night', False)'
2011-03-27 16:20:09,688 - DEBUG - Weather: got sunrise '06:01:58', sunset '18:08:29', night = False
2011-03-27 16:20:09,688 - DEBUG - Indicator: updateWeather: got condition 'None', icon 'weather-few-clouds'
2011-03-27 16:20:09,688 - DEBUG - Weather: day, show 'weather-few-clouds' icon
2011-03-27 16:20:09,690 - DEBUG - Indicator: fill in menu with params: city='Toronto', temp='Temperature: -2 C', humid='Humidity: 39%', wind='Wind: N at 22.5 km/h', sunrise='Sunrise: 06:01:58 AM', sunset='Sunset: 06:08:29 PM', puretemp=-2 C
2011-03-27 16:20:09,690 - DEBUG - Indicator: menu_normal: filling in a menu for found places
2011-03-27 16:20:09,694 - DEBUG - Indicator: update_label: setting label to ''
2011-03-27 16:20:09,698 - DEBUG - Setting: Saving cached weather data
2011-03-27 16:20:09,698 - DEBUG - Weather: day, show 'weather-few-clouds' icon
2011-03-27 16:20:09,700 - DEBUG - Setting: getting cached weather for 4118
2011-03-27 16:20:09,710 - DEBUG - Indicator: update_label: setting label to '-2 C'
2011-03-27 16:20:09,714 - DEBUG - Setting: getting value for current
2011-03-27 16:20:09,719 - DEBUG - Setting: setting 'current'='Partly Cloudy'
2011-03-27 16:20:09,720 - DEBUG - Setting: getting value for current
2011-03-27 16:20:09,726 - DEBUG - Setting: setting 'current' was updated
2011-03-27 16:20:09,738 - DEBUG - Indicator: updateWeather: setting rate to 15
2011-03-27 16:20:12,673 - DEBUG - Indicator: open Forecast
2011-03-27 16:20:12,673 - DEBUG - ExtendedForecast: creating
2011-03-27 16:20:12,680 - DEBUG - ExtendedForecast: finishing initialization
2011-03-27 16:20:12,681 - DEBUG - ExtendedForecast: chosen place: Toronto (code 4118)
2011-03-27 16:20:12,681 - DEBUG - ExtendedForecast: getting forecast data
2011-03-27 16:20:13,055 - DEBUG - ExtendedForecast: parsing forecast data

traceback:
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/indicator-weather", line 1173, in extforecast
     self.forecastwd = ExtendedForecast()
   File "/usr/bin/indicator-weather", line 1366, in __new__
     new_object.finish_initializing(builder)
   File "/usr/bin/indicator-weather", line 1403, in finish_initializing
     google_icon = Weather._GoogleConditions[icons[i-1]][0]
 KeyError: u''

Related branches

Changed in weather-indicator:
status: New → Confirmed
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

I had been able to reproduce this with 11.03.27, but I wiped my config and now it doesn't happen...

Changed in weather-indicator:
importance: Undecided → High
milestone: none → cloudy-3
Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Can't reproduce anymore. Please reopen if this still happens on 11.03.27 or later release

Changed in weather-indicator:
status: Confirmed → Incomplete
Revision history for this message
Lucas (lucas-sichardt) wrote :

Indicator does not crash on my machine but forecast does not open. Logfiles attached...

Revision history for this message
Felix Lawrence (felix-lawrence) wrote :

I think this behaviour was fixed by the google latitude/longitude patch, BUT that patch only fixes new locations and does not correct existing locations (it can't correct existing locations without searching geonames again). So if you delete and recreate your existing location(s), it _should_ work. Let me know if it doesn't!

Revision history for this message
Justin (deadite81) wrote :

Hi, sorry about the duplicate. I saw this but didn't read far enough down. Anyway, I am still having the problem of the forcast dialog not popping up.

I reset my location (through the gui), which didn't work. Then I removed my desktop-couch folders and restarted my computer, which reset Weather Indicator completely, but still did not fix the problem.

Any suggestions?

Revision history for this message
Justin (deadite81) wrote :

My computer locked up while I was trying to play a game using nouveau. After the hard reboot I now have the forecast dialog back (although the icons still aren't correct). I can only assume that whatever need to be removed/changed got nuked, but simply resetting the location didn't fix it. Maybe a straggling tmp file somewhere?

Revision history for this message
Lucas (lucas-sichardt) wrote :

I've also tried choosing the location new. But this didn't help for me too. It is also still the same problem in the new version 11.04.02~lucid1...

Revision history for this message
Felix Lawrence (felix-lawrence) wrote :

Oh dear! Lucas, does the problem mainly appear for Gittersdorf or does it work elsewhere?

Justin: had you not rebooted after upgrading perhaps?

Revision history for this message
Justin (deadite81) wrote :

Yea, I had already rebooted a couple times. It stopped working again anyway. I am now receiving the same error again. It was working when I left, now its several hours latter and its not. I don't hibernate or suspend my computer, I only use the blank screensaver. Maybe it's Google's fault?

Revision history for this message
Lucas (lucas-sichardt) wrote :

Hello,

I've just tested a bit more and found that it is really a location dependent problem. For Gittersdorf it does not work at all (Google and Yahoo!), but for other locations it works. I cannot determine any logical reason for that as it also works for Bad Hersfeld which is just 5km from here and does not have a weather station as well (as far as I know) - so values for Bad Hersfeld must be calculated too... Same effect on other little villages in this region - just the next village from here which is called Untergeis works well - only 2km from here.
I've rebooted several times since last update but at the moment I guess there must be something left from an older version that "blocks" Gittersdorf. (I've also set the preferences to zero by gconf-editor...)

Changed in weather-indicator:
assignee: nobody → Felix Lawrence (felix-lawrence)
status: Incomplete → In Progress
Revision history for this message
Felix Lawrence (felix-lawrence) wrote :

Lucas: The Gittersdorf forecast is working on my computer, so this is quite hard for me to debug! Could you please try making a new location, called Gittersdorf2, and see if the forecast works for that?

I'm not sure exactly what is causing this bug - perhaps we're receiving an empty forecast from Google, perhaps we're receiving some as-yet-unhandled weather condition. But in any case, it should not cause a crash.

I've uploaded a branch that will stop the crash and write useful debug info to the error log. The Forecast window should appear with whatever (incomplete) information is available.

Revision history for this message
Lucas (lucas-sichardt) wrote :

Hi Felix,

I've just added a new location "Gittersdorfneu" and tried the forecast. It worked! As well from that moment on the forecast also worked for my "old" Gittersdorf. So I deleted all other locations and tried the old Gittersdorf again, and: it worked!

So I guess there was something broken within the configuration?

But apart from "why this?": It now works and we can have a party ;)

Revision history for this message
Justin (deadite81) wrote :

Well...now it works again. After a reboot. And the icon for "Scattered Thunderstorms" is appearing, whereas before it was just a no_icon_available symbol (has been broken for some time actually). So could this just have to do with Natty? I restarted because I got a bunch of gtk updates, maybe that helped? It could die again, I guess I'll just wait and see :)

Revision history for this message
Felix Lawrence (felix-lawrence) wrote :

Great to hear it's working for you again Lucas!

Justin: I noticed a typo in the Google weather/forecast dictionary - if google's icon is 'thunderstorm' then that'll be shown as a 'no icon' symbol in indicator-weather. That's a separate issue but is fixed in the code branch attached to this bug (so will presumably be fixed in the next release). Let me know if the forecast stops working again, and tell me the affected location(s).

Revision history for this message
Justin (deadite81) wrote :

Will do. Everything is working fine right now. Ah, just for "Thunderstorms" and not "Scattered..." Glad to here you fixed it :)

Changed in weather-indicator:
milestone: 11.04.02 → cloudy-4
Revision history for this message
Rocko (rockorequin) wrote :

I get the same error with the forecast for Perth, WA using 11.04.02:

DEBUG:IndicatorWeather:ExtendedForecast: chosen place: Perth (code 1098081)
DEBUG:IndicatorWeather:ExtendedForecast: getting forecast data
DEBUG:IndicatorWeather:ExtendedForecast: parsing forecast data
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1232, in extforecast
    self.forecastwd = ExtendedForecast()
  File "/usr/bin/indicator-weather", line 1438, in __new__
    new_object.finish_initializing(builder)
  File "/usr/bin/indicator-weather", line 1475, in finish_initializing
    google_icon = Weather._GoogleConditions[icons[i-1]][0]
KeyError: u''

Revision history for this message
Rocko (rockorequin) wrote :

And this morning, the forecast for Perth is magically working again:

DEBUG:IndicatorWeather:ExtendedForecast: chosen place: Perth (code 1098081)
DEBUG:IndicatorWeather:ExtendedForecast: getting forecast data
DEBUG:IndicatorWeather:ExtendedForecast: parsing forecast data
DEBUG:IndicatorWeather:ExtendedForecast: closing window

So it isn't a problem with the location, but something in the returned data that it cannot parse correctly. Perhaps if we printed out the data in the debug output it might help to track it down?

Revision history for this message
Rocko (rockorequin) wrote :

I tried a nearby location and got this error trying to get the forecast:

DEBUG:IndicatorWeather:Indicator: open Forecast
DEBUG:IndicatorWeather:ExtendedForecast: creating
DEBUG:IndicatorWeather:ExtendedForecast: finishing initialization
DEBUG:IndicatorWeather:ExtendedForecast: chosen place: Perth (Melville) (code 1107190)
DEBUG:IndicatorWeather:ExtendedForecast: getting forecast data
Traceback (most recent call last):
  File "/usr/bin/indicator-weather", line 1232, in extforecast
    self.forecastwd = ExtendedForecast()
  File "/usr/bin/indicator-weather", line 1438, in __new__
    new_object.finish_initializing(builder)
  File "/usr/bin/indicator-weather", line 1452, in finish_initializing
    forecast.prepare_forecast_data()
  File "/usr/bin/indicator-weather", line 331, in prepare_forecast_data
    self.unitsystem = self.forecast['forecast_information']['unit_system']
KeyError: 'unit_system'

Revision history for this message
Felix Lawrence (felix-lawrence) wrote :

Aha, thanks rocko, with Melville I can finally reproduce this bug on my own computer. What's happening is that the google weather API is returning no data for that latitude and longitude. Whether that's our fault or theirs is what I've got to determine next!

FYI the URL we hit to get the data for melville is this one: http://www.google.com/ig/api?weather=,,,-28183333,116733333 The numbers should be Melville's latitude and longitude times one million, but it's actually somewhere out in the sticks, just north of yalgoo. Hmm.

Changed in weather-indicator:
status: In Progress → Fix Committed
Changed in weather-indicator:
status: Fix Committed → Fix Released
Revision history for this message
Justin (deadite81) wrote :

This is a different problem, but its related to this fix. After upgrading I have no executable "indicator-weather" in /usr/bin. I can't launch weather indicator at all now.

Revision history for this message
Justin (deadite81) wrote :

It works now.

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

Bug attachments

Remote bug watches

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