[Featureserver] Can't adapt error
Yves Moisan
yves.moisan at boreal-is.com
Thu Aug 27 11:09:23 EDT 2009
>
> import psycopg2
> import psycopg2.extras
> import psycopg2.extensions
> import mod_python
> psycopg2.extensions.register_adapter(mod_python.util.StringField, \
> psycopg2.extensions.QuotedString)
>
> I tried plunking that into PostGIS.py to no avail.
Plunking those lines in handlers.py does the trick. FS now works
properly under mod_python. However, it won't run in CGI mode anymore.
Apache error.log says "ImportError: No module named _apache\r" which is
the same as if you try the above commands one by one at the Python
prompt. It will stumble at the "import mod_python" line and spew out
that same error.
Can the handler detect a mod_python environment and activate those lines
only then ?
Yves
More information about the Featureserver
mailing list