From 96047637cdba647815663667a8e30d43abd74e7d Mon Sep 17 00:00:00 2001 From: Logan Williams Date: Wed, 3 Apr 2024 15:18:49 +0200 Subject: [PATCH] Catch correct JSON error --- instagram_locations/instagram_locations.py | 2 +- instagram_locations/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/instagram_locations/instagram_locations.py b/instagram_locations/instagram_locations.py index 89076fd..5458573 100644 --- a/instagram_locations/instagram_locations.py +++ b/instagram_locations/instagram_locations.py @@ -31,7 +31,7 @@ def get_instagram_locations(lat, lng, cookie): try: locations = response.json() - except json.JSONDecodeError: + except json.decoder.JSONDecodeError: print(f"Failed to get location data for {lat_long}: please check you have a valid cookie") return [] diff --git a/instagram_locations/version.py b/instagram_locations/version.py index 71e0f77..b1c339a 100644 --- a/instagram_locations/version.py +++ b/instagram_locations/version.py @@ -3,7 +3,7 @@ _MAJOR = "1" _MINOR = "4" # On main and in a nightly release the patch should be one ahead of the last # released build. -_PATCH = "1" +_PATCH = "2" # This is mainly for nightly builds which have the suffix ".dev$DATE". See # https://semver.org/#is-v123-a-semantic-version for the semantics. _SUFFIX = ""