From: | Efraín Déctor <efraindector(at)motumweb(dot)com> |
---|---|
To: | "Adrian Klaver" <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Error with plpython |
Date: | 2012-07-11 00:34:39 |
Message-ID: | 9D6F15A4DFE34ACF98F7E0C615296DFA@CMOTUM25PC |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
We tested, the code directly into Python:
from googlemaps import GoogleMaps
gmaps= GoogleMaps()
address = gmaps.latlng_to_address(18.835124317498853,-97.11448417315677)
repr(address)
And on both servers work without a problem. My guess is that something about
OpenSSL on the production server is not working with plpython. But I don't
know how to fix this.
Thanks
-----Mensaje original-----
From: Adrian Klaver
Sent: Tuesday, July 10, 2012 7:24 PM
To: Efraín Déctor
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Error with plpython
On 07/10/2012 02:59 PM, Efraín Déctor wrote:
> 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.
At a guess something is not the same:)
1) Does SSLError exist on the production server
2) If it does exist, is it in the Python path?
> Thanks in advance.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2012-07-11 01:57:38 | Re: Error with plpython |
Previous Message | Adrian Klaver | 2012-07-11 00:24:37 | Re: Error with plpython |