my-weather-indicator stopped working on ubuntu 20.10

Bug #1906077 reported by Jan Wester
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
my-weather-indicator
New
Undecided
Unassigned

Bug Description

my-weather-indicator has worked flawlessly for a long time. I am running my-weather-indicator with service openweathermap but now it gives an error code: KeyError: 616

janw-MS-7522{janw}(49)% /opt/extras.ubuntu.com/my-weather-indicator/bin/my-weather-indicator
<gettext.GNUTranslations object at 0x7ff2d48ea4c0>
#####################################################
System: Linux
Machine: x86_64
Node: janw-MS-7522
Release: 5.8.0-31-generic
Version: #33-Ubuntu SMP Mon Nov 23 18:44:54 UTC 2020
Platform: Linux-5.8.0-31-generic-x86_64-with-glibc2.32
My-Weather-Indicator version: 0.9.5-0extras20.04.09
#####################################################

My-Weather-Indicator version: 0.9.5-0extras20.04.09
#####################################################
****** Requesting timezone identificacion
** OWM **
2669772 18.1182 59.446201
****** Requesting timezone identificacion
** OWM **
2688250 18.59506 59.59389
1
***** refreshing weather *****
OK. Internet connection. HTTPConnection: www.google.com
--- Updating data in location 0 ---
****** Updating weather
****** Calculating rawOffset
-------------------------------------------------------
OpenWeatherMap Weather Service url:http://api.openweathermap.org/data/2.5/weather?id=2669772&appid=4516154e5c8a6494e7e13b550408c863
-------------------------------------------------------
Traceback (most recent call last):
  File "/opt/extras.ubuntu.com/my-weather-indicator/bin/my-weather-indicator", line 36, in <module>
    main()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 956, in main
    MWI()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 126, in __init__
    self.load_preferences()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 352, in load_preferences
    self.update_weather()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 141, in update_weather
    self.update_menu(i)
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/myweatherindicator.py", line 669, in update_menu
    weather = self.weatherservices[index].get_weather()
  File "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wopenweathermapapi.py", line 263, in get_weather
    condition = CONDITION[data['weather'][0]['id']]
KeyError: 616

My config file is this:

more my-weather-indicator.conf
{
    "24h": true,
    "autolocation": false,
    "first-time": false,
    "icon-light": true,
    "latitude": 59.446201,
    "latitude2": 59.59389,
    "location": "H\u00e4gern\u00e4s",
    "location2": "Bergshamra",
    "longitude": 18.1182,
    "longitude2": 18.59506,
    "main-location": true,
    "onalldesktop1": true,
    "onalldesktop2": true,
    "onwidget1hide": false,
    "onwidget1top": false,
    "onwidget2hide": false,
    "onwidget2top": false,
    "pressure": "mb",
    "rain": "mm",
    "refresh": 1.0,
    "second-location": true,
    "show-notifications": true,
    "show-notifications2": true,
    "show-temperature": true,
    "show-temperature2": true,
    "showintaskbar1": true,
    "showintaskbar2": true,
    "skin1": "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indic
ator/skins/simple",
    "skin2": "/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indic
ator/skins/simple",
    "snow": "cm",
    "temperature": "C",
    "version": "0.9.5-0extras20.04.09",
    "visibility": "km",
    "weather-service": "openweathermap",
    "widget1": false,
    "widget2": false,
    "wind": "km/h",
    "wp1-x": 0,
    "wp1-y": 0,
    "wp2-x": 0,
    "wp2-y": 0,
    "wu-key": "",
    "wwo-key": ""
}

Revision history for this message
Jan Wester (j-vester) wrote :

I did some more testing on this. I actually reinstalled the package and then I set latitude2 and longitude2 to 0. And location2 to be blank. That seems to have stopped the crash with that KeyError. And it seems to be working with one location. SO perhaps that Bergshamra location is a problem for openweathermap suddenly. Note I use exactly the same latitude and longitude and location for the only remaining destination. Perhaps openweathermap requires something extra for this suddenly......

This is the modified configuration file:

{
    "24h": true,
    "autolocation": false,
    "first-time": false,
    "http-port": 0,
    "http-proxy": "",
    "https-port": 0,
    "https-proxy": "",
    "icon-light": true,
    "latitude": 59.446201,
    "latitude2": 0,
    "location": "H\u00e4gern\u00e4s",
    "location2": "",
    "longitude": 18.1182,
    "longitude2": 0,
    "main-location": true,
    "onalldesktop1": true,
    "onalldesktop2": true,
    "onwidget1hide": false,
    "onwidget1top": false,
    "onwidget2hide": false,
    "onwidget2top": false,
    "pressure": "mb",
    "rain": "mm",
    "refresh": 1.0,
    "second-location": false,
    "show-notifications": true,
    "show-notifications2": true,
    "show-temperature": true,
    "show-temperature2": true,
    "showintaskbar1": false,
    "showintaskbar2": false,
    "skin1": "/usr/share/my-weather-indicator/skins/little",
    "skin2": "/usr/share/my-weather-indicator/skins/little",
    "snow": "cm",
    "temperature": "C",
    "version": "0.9.5-0extras20.04.09",
    "visibility": "km",
    "weather-service": "openweathermap",
    "widget1": false,
    "widget2": false,
    "wind": "km/h",
    "wp1-x": 0,
    "wp1-y": 0,
    "wp2-x": 0,
    "wp2-y": 0,
    "wu-key": "",
    "wwo-key": ""

Revision history for this message
Jan Wester (j-vester) wrote :

For the moment everything seems to be working fine again on my machines. I did a minor change in /opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/wopenweathermapapi.py where I changed APPID to my personal id from openweathermap. That seems to have made everything starting again. Have tested same thing on two of my machines and it works on both machines now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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