Commit bd79940b971e4cb3aff7b1296bf3160f2e63888b

Authored by Antoine Goutenoir
1 parent f0903e16
Exists in master

chore: move to python 3

/spend 2min
Showing 1 changed file with 2 additions and 4 deletions   Show diff stats
flaskr/controllers/main_controller.py
@@ -374,7 +374,7 @@ def compute(): # process the queue of estimation requests @@ -374,7 +374,7 @@ def compute(): # process the queue of estimation requests
374 continue 374 continue
375 375
376 try: 376 try:
377 - origin = geocoder.geocode(origin_address.encode('utf-8')) 377 + origin = geocoder.geocode(origin_address)
378 except geopy.exc.GeopyError as e: 378 except geopy.exc.GeopyError as e:
379 warning = u"Ignoring origin `%s` " \ 379 warning = u"Ignoring origin `%s` " \
380 u"since we failed to geocode it.\n%s\n" % ( 380 u"since we failed to geocode it.\n%s\n" % (
@@ -430,9 +430,7 @@ def compute(): # process the queue of estimation requests @@ -430,9 +430,7 @@ def compute(): # process the queue of estimation requests
430 continue 430 continue
431 431
432 try: 432 try:
433 - destination = geocoder.geocode(  
434 - destination_address.encode('utf-8')  
435 - ) 433 + destination = geocoder.geocode(destination_address)
436 except geopy.exc.GeopyError as e: 434 except geopy.exc.GeopyError as e:
437 warning = u"Ignoring destination `%s` " \ 435 warning = u"Ignoring destination `%s` " \
438 u"since we failed to geocode it.\n%s\n" % ( 436 u"since we failed to geocode it.\n%s\n" % (