From 2f223dde11ad2094c25b3d18805168ea58e54c61 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 30 Dec 2018 23:42:06 -0800 Subject: [PATCH] NuWeather: fix geocode error if osm_id is unavailable --- NuWeather/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuWeather/plugin.py b/NuWeather/plugin.py index 06325bd..189011e 100644 --- a/NuWeather/plugin.py +++ b/NuWeather/plugin.py @@ -178,7 +178,7 @@ class NuWeather(callbacks.Plugin): lat = data['lat'] lon = data['lon'] - osm_id = data['osm_id'] + osm_id = data.get('osm_id') self.log.debug('NuWeather: saving %s,%s (osm_id %s, %s) for location %s', lat, lon, osm_id, display_name, location) result = (lat, lon, display_name, osm_id)