From bd79940b971e4cb3aff7b1296bf3160f2e63888b Mon Sep 17 00:00:00 2001 From: Antoine Goutenoir Date: Tue, 30 Mar 2021 06:58:34 +0200 Subject: [PATCH] chore: move to python 3 --- flaskr/controllers/main_controller.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flaskr/controllers/main_controller.py b/flaskr/controllers/main_controller.py index 9f151cf..fd9de89 100644 --- a/flaskr/controllers/main_controller.py +++ b/flaskr/controllers/main_controller.py @@ -374,7 +374,7 @@ def compute(): # process the queue of estimation requests continue try: - origin = geocoder.geocode(origin_address.encode('utf-8')) + origin = geocoder.geocode(origin_address) except geopy.exc.GeopyError as e: warning = u"Ignoring origin `%s` " \ u"since we failed to geocode it.\n%s\n" % ( @@ -430,9 +430,7 @@ def compute(): # process the queue of estimation requests continue try: - destination = geocoder.geocode( - destination_address.encode('utf-8') - ) + destination = geocoder.geocode(destination_address) except geopy.exc.GeopyError as e: warning = u"Ignoring destination `%s` " \ u"since we failed to geocode it.\n%s\n" % ( -- libgit2 0.21.2