From e8c60e9f9b14b0d6ccd572fbccffb64ae1bc5794 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Mon, 4 Dec 2023 21:26:09 +0000 Subject: [PATCH] r.json() doesn't throw simplejson error any more --- geocode/wikidata.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/geocode/wikidata.py b/geocode/wikidata.py index deee241..ff07ba0 100644 --- a/geocode/wikidata.py +++ b/geocode/wikidata.py @@ -4,7 +4,6 @@ import typing import urllib.parse import requests -import simplejson.errors from flask import render_template from . import headers @@ -86,7 +85,7 @@ def wdqs(query: str) -> list[Row]: try: return typing.cast(list[Row], r.json()["results"]["bindings"]) - except simplejson.errors.JSONDecodeError: + except requests.exceptions.JSONDecodeError: raise QueryError(query, r)