Error with plpython
Hello.
Strange thing happening:
We rencently installed plpython in one of our test servers and installed an extension to use the google api (http://pypi.python.org/pypi/googlemaps ) , everything went fine we tested this function:
CREATE OR REPLACE FUNCTION google_reverse_geocode(lat numeric, lon numeric)
RETURNS text AS
$BODY$
from googlemaps import GoogleMaps
gmaps= GoogleMaps()
address = gmaps.latlng_to_address(lat,lon)
return (address)
$BODY$
LANGUAGE plpythonu VOLATILE
COST 100;
ALTER FUNCTION google_reverse_geocode(numeric, numeric)
OWNER TO pgsql;
However, once we installed it on our production server that function doesnt work, it keeps sending this message:
ERROR: ImportError: cannot import name SSLError
CONTEXT: Traceback (most recent call last):
The strange thing is that our server are the same in everything so we don’t know why is failing in our production eviroment.
Thanks in advance.
On 07/11/2012 06:16 AM, Efraín Déctor wrote:
However, once we installed it on our production server that function
doesnt work, it keeps sending this message:
ERROR: ImportError: cannot import name SSLError
CONTEXT: Traceback (most recent call last):
The strange thing is that our server are the same in everything so we
don’t know why is failing in our production eviroment.
I'm guessing it isn't really the same.
You're probably missing a library that Python's SSL support requires,
missing some Python modules, or have a library that isn't compatible
with the one Python's SSL support was built against.
Since you've neglected to describe your client or server environments at
all, it's hard to say more.
--
Craig Ringer