Commit c098cd65162616fc940612c52bdad3f047bd9f36
1 parent
3d17c7c3
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 | 374 | continue |
375 | 375 | |
376 | 376 | try: |
377 | - origin = geocoder.geocode(origin_address.encode('utf-8')) | |
377 | + origin = geocoder.geocode(origin_address) | |
378 | 378 | except geopy.exc.GeopyError as e: |
379 | 379 | warning = u"Ignoring origin `%s` " \ |
380 | 380 | u"since we failed to geocode it.\n%s\n" % ( |
... | ... | @@ -430,9 +430,7 @@ def compute(): # process the queue of estimation requests |
430 | 430 | continue |
431 | 431 | |
432 | 432 | try: |
433 | - destination = geocoder.geocode( | |
434 | - destination_address.encode('utf-8') | |
435 | - ) | |
433 | + destination = geocoder.geocode(destination_address) | |
436 | 434 | except geopy.exc.GeopyError as e: |
437 | 435 | warning = u"Ignoring destination `%s` " \ |
438 | 436 | u"since we failed to geocode it.\n%s\n" % ( | ... | ... |