bug fixes

This commit is contained in:
Edward Betts 2021-04-16 22:35:11 +02:00
parent 59611dd077
commit fbcf3d102b
2 changed files with 2 additions and 2 deletions

View file

@ -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,

View file

@ -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 <https://commons.wikimedia.org/> }
OPTIONAL { ?item wdt:P373 ?commonsCat }