Quantcast

collective.geo GBadKeyError when geocoding w/ geopy

classic Classic list List threaded Threaded
4 messages Options
David Siedband David Siedband
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

collective.geo GBadKeyError when geocoding w/ geopy

I have a Plone 4.1 site running the collective.geo bundle.

On the Coordinates view, the geocoding function from searching location name just spins.  I looked at the HTTP requests, I can see it calling the geocoding view with URLs like:

http://site.com/geocoderview?address=Amsterdam+NL

At that point it throws an error about:
GBadKeyError: The api_key is either invalid or does not match the domain for which it was given.

I tried hardcoding a valid GoogleMaps API in the Google class' __init__ function in geopy/geocoders/google.py  but it still gave me the same error message.

Here are my version pins and the complete traceback:

Shapely = 1.2.14
geopy = 0.94.2
collective.geo.bundle = 0.1
collective.geo.contentlocations = 2.4
collective.geo.geographer = 1.4
collective.geo.kml = 2.4
collective.geo.mapwidget = 1.5
collective.geo.openlayers = 0.2.4
collective.geo.settings = 2.4
collective.z3cform.colorpicker = 0.2

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module collective.geo.geographer.geocoder, line 59, in __call__
  Module collective.geo.geographer.geocoder, line 29, in retrieve
  Module geopy.geocoders.google, line 81, in geocode
  Module geopy.geocoders.google, line 88, in geocode_url
  Module geopy.geocoders.google, line 107, in parse_xml
  Module geopy.geocoders.google, line 169, in check_status_code
GBadKeyError: The api_key is either invalid or does not match the domain for which it was given.

--
David Siedband
http://zentraal.com


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
gborelli gborelli
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: collective.geo GBadKeyError when geocoding w/ geopy

Hi David,

2013/3/13 David Siedband <[hidden email]>:
> I have a Plone 4.1 site running the collective.geo bundle.
>
> On the Coordinates view, the geocoding function from searching location name just spins.  I looked at the HTTP requests, I can see it calling the geocoding view with URLs like:
>
> http://site.com/geocoderview?address=Amsterdam+NL
>
> At that point it throws an error about:
> GBadKeyError: The api_key is either invalid or does not match the domain for which it was given.

This issue is releated to google maps API v3 and it should be fixed in
the trunk of c.geo.geographer and geopy 0.95
- http://goo.gl/77HrV
- https://github.com/geopy/geopy/blob/master/RELEASES


> I tried hardcoding a valid GoogleMaps API in the Google class' __init__ function in geopy/geocoders/google.py  but it still gave me the same error message.
>
> Here are my version pins and the complete traceback:
>
> Shapely = 1.2.14
> geopy = 0.94.2
> collective.geo.bundle = 0.1
> collective.geo.contentlocations = 2.4
> collective.geo.geographer = 1.4
> collective.geo.kml = 2.4
> collective.geo.mapwidget = 1.5
> collective.geo.openlayers = 0.2.4
> collective.geo.settings = 2.4
> collective.z3cform.colorpicker = 0.2
>
> Traceback (innermost last):
>   Module ZPublisher.Publish, line 126, in publish
>   Module ZPublisher.mapply, line 77, in mapply
>   Module ZPublisher.Publish, line 46, in call_object
>   Module collective.geo.geographer.geocoder, line 59, in __call__
>   Module collective.geo.geographer.geocoder, line 29, in retrieve
>   Module geopy.geocoders.google, line 81, in geocode
>   Module geopy.geocoders.google, line 88, in geocode_url
>   Module geopy.geocoders.google, line 107, in parse_xml
>   Module geopy.geocoders.google, line 169, in check_status_code
> GBadKeyError: The api_key is either invalid or does not match the domain for which it was given.
>
> --
> David Siedband
> http://zentraal.com
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> Plone-Users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-users



--
Giorgio Borelli

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
gborelli gborelli
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: collective.geo GBadKeyError when geocoding w/ geopy

In reply to this post by David Siedband
Hi David,

2013/3/13 David Siedband <[hidden email]>:
> I have a Plone 4.1 site running the collective.geo bundle.
>
> On the Coordinates view, the geocoding function from searching location name just spins.  I looked at the HTTP requests, I can see it calling the geocoding view with URLs like:
>
> http://site.com/geocoderview?address=Amsterdam+NL
>
> At that point it throws an error about:
> GBadKeyError: The api_key is either invalid or does not match the domain for which it was given.


This issue is releated to google maps API v3 and it should be fixed in
the trunk of c.geo.geographer and geopy 0.95
- http://goo.gl/77HrV
- https://github.com/geopy/geopy/blob/master/RELEASES


> I tried hardcoding a valid GoogleMaps API in the Google class' __init__ function in geopy/geocoders/google.py  but it still gave me the same error message.
>
> Here are my version pins and the complete traceback:
>
> Shapely = 1.2.14
> geopy = 0.94.2
> collective.geo.bundle = 0.1
> collective.geo.contentlocations = 2.4
> collective.geo.geographer = 1.4
> collective.geo.kml = 2.4
> collective.geo.mapwidget = 1.5
> collective.geo.openlayers = 0.2.4
> collective.geo.settings = 2.4
> collective.z3cform.colorpicker = 0.2
>
> Traceback (innermost last):
>   Module ZPublisher.Publish, line 126, in publish
>   Module ZPublisher.mapply, line 77, in mapply
>   Module ZPublisher.Publish, line 46, in call_object
>   Module collective.geo.geographer.geocoder, line 59, in __call__
>   Module collective.geo.geographer.geocoder, line 29, in retrieve
>   Module geopy.geocoders.google, line 81, in geocode
>   Module geopy.geocoders.google, line 88, in geocode_url
>   Module geopy.geocoders.google, line 107, in parse_xml
>   Module geopy.geocoders.google, line 169, in check_status_code
> GBadKeyError: The api_key is either invalid or does not match the domain for which it was given.
>
> --
> David Siedband
> http://zentraal.com
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> Plone-Users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-users



--
Giorgio Borelli

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
marr marr
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: collective.geo GBadKeyError when geocoding w/ geopy

In reply to this post by David Siedband
Try update to use Google Maps v3.

See https://github.com/collective/collective.geo.geographer/pull/2 for more info.

Good luck!

On Wed, Mar 13, 2013 at 4:02 PM, David Siedband <[hidden email]> wrote:
I have a Plone 4.1 site running the collective.geo bundle.

On the Coordinates view, the geocoding function from searching location name just spins.  I looked at the HTTP requests, I can see it calling the geocoding view with URLs like:

http://site.com/geocoderview?address=Amsterdam+NL

At that point it throws an error about:
GBadKeyError: The api_key is either invalid or does not match the domain for which it was given.

I tried hardcoding a valid GoogleMaps API in the Google class' __init__ function in geopy/geocoders/google.py  but it still gave me the same error message.

Here are my version pins and the complete traceback:

Shapely = 1.2.14
geopy = 0.94.2
collective.geo.bundle = 0.1
collective.geo.contentlocations = 2.4
collective.geo.geographer = 1.4
collective.geo.kml = 2.4
collective.geo.mapwidget = 1.5
collective.geo.openlayers = 0.2.4
collective.geo.settings = 2.4
collective.z3cform.colorpicker = 0.2

Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module collective.geo.geographer.geocoder, line 59, in __call__
  Module collective.geo.geographer.geocoder, line 29, in retrieve
  Module geopy.geocoders.google, line 81, in geocode
  Module geopy.geocoders.google, line 88, in geocode_url
  Module geopy.geocoders.google, line 107, in parse_xml
  Module geopy.geocoders.google, line 169, in check_status_code
GBadKeyError: The api_key is either invalid or does not match the domain for which it was given.

--
David Siedband
http://zentraal.com


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Loading...