title: GoogleMaps API -address to coordinates (latitude,longitude)
body: <p>This is driving me crazy.
  I have deleted this key 1000 times so far.
  Yesterday it worked like a charm, today not anymore
  Here is the python code:</p>
  
  <pre><code>from googlemaps import GoogleMaps
  gmaps = GoogleMaps("AIzaSyBIdSyB_td3PE-ur-ISjwFUtBf2O0Uo0Jo")
  exactaddress ="1 Toronto Street Toronto"
  lat, lng = gmaps.address_to_latlng(exactaddress)
  print lat, lng
  
  GoogleMapsError: Error 610: G_GEO_BAD_KEY
  </code></pre>
  
  <p>It is now returning the above error for no obvious reasons.
  I don't think I have reached the request limit or the maximum rate
  To stay on the safe side I even introduced delays (1sec) ...stil getting the same error</p>
  
  <p>Does anybody have any idea how I can solve this?
  Having to work with a different python module is fine if you can indicate an alternative to the one that I am currently using.</p>
  
  <p>thanks
  C</p>
  
  <p>PS: the key is valid, it is a client key and it was automatically enabled when I enabled GoogleMAP API3 in the App console. No restrictions for domains or IPs</p>
  
  <p><strong>EDIT: So here is what I ended up using</strong></p>
  
  <pre><code>def decodeAddressToCoordinates( address ):
          urlParams = {
                  'address': address,
                  'sensor': 'false',
          }  
          url = 'http://maps.google.com/maps/api/geocode/json?' + urllib.urlencode( urlParams )
          response = urllib2.urlopen( url )
          responseBody = response.read()
  
          body = StringIO.StringIO( responseBody )
          result = json.load( body )
          if 'status' not in result or result['status'] != 'OK':
                  return None
          else:
                  return {
                          'lat': result['results'][0]['geometry']['location']['lat'],
                          'lng': result['results'][0]['geometry']['location']['lng']
                  }  
  </code></pre>
  
  <p>The library that Jason pointed me to is also interesting but since my code was intended to fix something (one time use) I have not tried his solution. I will definitely consider that if I get to write code again :-) </p>