[pycsw-devel] Postgres Setup, getting error during getrecords
Dan Ramage
dan at inlet.geol.sc.edu
Wed Aug 27 04:48:24 PDT 2014
I've got postgres and postgis running, the database has the spatial tables.
I enabled the plpythonu language as well.
I'm running the server off the command line as I do my initial
learning/testing so there is no external server at the moment.
I think what might be happening is there is an import failing, but it's
not pycsw, it might be another dependency. I ran into that earlier when I
Was missing geolinks. I kept seeing an error of no module pycsw, however
it was masking the real issue.
The last INFO line logged is:
Wed, 27 Aug 2014 04:38:50] [DEBUG]
file=/home/madrona/src/pycsw/pycsw/server.py line=2326 module=server
function=_write_response Response:
Then in the log, there is no complete traceback, this is what is there:
<ows:ExceptionReport xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:ows="http://www.opengis.net/ows"
xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0"
xmlns:gml="http://www.opengis.net/gml"
xmlns:dif="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:srv="http://www.isotc211.org/2005/srv"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:fgdc="http://www.opengis.net/cat/csw/csdgm"
xmlns:inspire_ds="http://inspire.ec.europa.eu/schemas/inspire_ds/1.0"
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:os="http://a9.com/-/spec/opensearch/1.1/"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
language="en-US" version="1.2.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd"><ows:Exception
exceptionCode="InvalidParameterValue"
locator="constraint"><ows:ExceptionText>Invalid query: (InternalError)
ImportError: No module named pycsw
CONTEXT: Traceback (most recent call last):
PL/Python function "query_spatial", line 4, in <module>
from pycsw import util
PL/Python function "query_spatial"
"SELECT
On 8/26/14 7:03 PM, "Tom Kralidis" <tomkralidis at gmail.com> wrote:
>On Tue, Aug 26, 2014 at 3:33 PM, Dan Ramage <dan at inlet.geol.sc.edu> wrote:
>> Hi list, just setup an instance of PyCSW with postgresql as the
>>database.
>> When I do a get records query, I am seeing the following error come
>>back:
>> Invalid query: (InternalError) ImportError: No module named pycsw
>>CONTEXT:
>> Traceback (most recent call last): PL/Python function "query_spatial",
>>line
>> 4, in <module> from pycsw import util PL/Python function "query_spatial"
>>
>
>Are you running bare PostgreSQL or PostgreSQL with PostGIS? While bare
>PostgreSQL is supported it is strongly recommended to have PostGIS
>enabled.
>Base PostgreSQL support requires plpythonu support (see
>http://docs.pycsw.org/en/latest/administration.html#database-specific-note
>s).
>
>From the trace above it looks like it may be due to an issue with
>plpythonu.
>
>Can you enable your PostgreSQL with PostGIS and re-init the DB?
>
>> I'm running the server using: python csw.wsgi with a python virtual
>> environment. I am pretty sure there is a pathing issue going on, however
>> when I activate the python environment and "import pycsw" that works
>> properly. I'm thinking there may be something I am missing in the .wsgi
>>that
>> could be causing this.
>>
>
>What does your Apache configuration look like? If you run `python
>./csw.wsgi` at the command line and run requests against
>http://localhost:8000/, do they work?
>
>Any chance you can provide a fuller traceback or a test URL (feel free
>to send it offline if that works better).
>
>> I'd appreciate any pointers.
>>
More information about the pycsw-devel
mailing list