From 3e11d569d04c52494f2eaceb70910e03e1afd3dc Mon Sep 17 00:00:00 2001 From: Jonas Hoersch Date: Thu, 7 Feb 2019 13:03:18 +0100 Subject: [PATCH] build_shapes: Fix pycountry API change (fixes #1) See also https://bitbucket.org/flyingcircus/pycountry/commits/72b1927b3cb9bfd81b547244eefc45395e23f9b8 --- scripts/build_shapes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_shapes.py b/scripts/build_shapes.py index b8dba2e0..e3bc0a18 100644 --- a/scripts/build_shapes.py +++ b/scripts/build_shapes.py @@ -15,7 +15,7 @@ def _get_country(target, **keys): assert len(keys) == 1 try: return getattr(pyc.countries.get(**keys), target) - except KeyError: + except (KeyError, AttributeError): return np.nan def _simplify_polys(polys, minarea=0.1, tolerance=0.01, filterremote=True):