From fbcf3d102bfecb8eeb261de5f0995cc3de7b2cde Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 16 Apr 2021 22:35:11 +0200 Subject: [PATCH] bug fixes --- lookup.py | 2 +- templates/sparql/lookup_gss.sparql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lookup.py b/lookup.py index f19bbf2..e255e56 100755 --- a/lookup.py +++ b/lookup.py @@ -70,7 +70,7 @@ def build_dict(hit, lat, lon): def do_lookup(elements, lat, lon): try: hit = osm_lookup(elements, lat, lon) - except geocode.wkidata.QueryError as e: + except geocode.wikidata.QueryError as e: return { "query": e.query, "error": e.r.text, diff --git a/templates/sparql/lookup_gss.sparql b/templates/sparql/lookup_gss.sparql index f0ce841..c1da672 100644 --- a/templates/sparql/lookup_gss.sparql +++ b/templates/sparql/lookup_gss.sparql @@ -1,5 +1,5 @@ SELECT ?item ?itemLabel ?commonsSiteLink ?commonsCat WHERE { - ?item wdt:P836 {{ gss }} . + ?item wdt:P836 "{{ gss }}" . OPTIONAL { ?commonsSiteLink schema:about ?item ; schema:isPartOf } OPTIONAL { ?item wdt:P373 ?commonsCat }