From 0fa372f2c08a5197d658923d735a3d9b96df7602 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 24 Jul 2016 23:04:09 -0400 Subject: [PATCH] [fix] tags.get as nodes may not have type/id --- scripts/geodata/osm/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geodata/osm/formatter.py b/scripts/geodata/osm/formatter.py index f3483eac..61c3f8fd 100644 --- a/scripts/geodata/osm/formatter.py +++ b/scripts/geodata/osm/formatter.py @@ -397,7 +397,7 @@ class OSMAddressFormatter(object): if component_index: osm_components = [c for i, c in enumerate(osm_components) if self.boundary_component_priorities.get(osm_address_components.component_from_properties(country, c, containing=containing_ids[i + 1:]), -1) >= component_index and - (c['type'], c['id']) != (tags['type'], tags['id'])] + (c['type'], c['id']) != (tags.get('type', 'node'), tags.get('id'))] # Do addr:postcode, postcode, postal_code, etc. revised_tags = self.normalize_address_components(tags)