From 23c7a683a87637d8807b183f0a27470b49588acc Mon Sep 17 00:00:00 2001 From: j Date: Sat, 30 May 2020 13:57:34 +0200 Subject: [PATCH] fix exception --- pandora/user/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/user/utils.py b/pandora/user/utils.py index 808aaa69..86a21ae1 100644 --- a/pandora/user/utils.py +++ b/pandora/user/utils.py @@ -1,4 +1,4 @@ -from django.contrib.gis.geoip2 import GeoIP2 +from django.contrib.gis.geoip2 import GeoIP, GeoIP2Exception2 import ox @@ -22,7 +22,7 @@ def get_location(ip): else: try: location = g.city(ip) - except django.contrib.gis.geoip2.GeoIP2Exception: + except GeoIP2Exception: try: location = g.country(s.ip) except: