<NME> geocode.py
<BEF> from django.utils.encoding import smart_str
from __future__ import absolute_import
from django.utils.encoding import smart_str
from geopy import geocoders
from geopy.geocoders.base import GeocoderServiceError

class Error(Exception):
    pass
class Error(Exception):
    pass


def google_v3(address):
    """
    Given an address, return ``(computed_address, (latitude, longitude))``
    tuple using Google Geocoding API v3.

    """
    try:
        g = geocoders.GoogleV3(api_key=settings.EASY_MAPS_GOOGLE_KEY)

        results = g.geocode(smart_str(address), exactly_one=False)
        if results is not None:
            return results[0]

        raise Error("No results found for '%s'" % address)
    except (UnboundLocalError, ValueError, GeocoderServiceError) as e:
        raise Error(e)

<MSG> import from geopy.exc instead of geopy.geocoders.base

<DFF> @@ -2,7 +2,7 @@
 from __future__ import absolute_import
 from django.utils.encoding import smart_str
 from geopy import geocoders
-from geopy.geocoders.base import GeocoderServiceError
+from geopy.exc import GeocoderServiceError
 
 class Error(Exception):
     pass

import from geopy.exc instead of geopy.geocoders.base