Commits

Will Emmerson  committed d99b058

fix ImportError: cannot import name GeocoderResultError problem

  • Participants
  • Parent commits b88c972

Comments (0)

Files changed (1)

File easy_maps/geocode.py

 from __future__ import absolute_import
 from django.utils.encoding import smart_str
 from geopy import geocoders
-from geopy.geocoders.base import GeocoderResultError
+from geopy.geocoders.base import GeocoderServiceError
 
 class Error(Exception):
     pass
         g = geocoders.GoogleV3()
         address = smart_str(address)
         return g.geocode(address, exactly_one=False)[0]
-    except (UnboundLocalError, ValueError, GeocoderResultError) as e:
+    except (UnboundLocalError, ValueError, GeocoderServiceError) as e:
         raise Error(e)