[pycsw-devel] Fwd: Postgres Setup, getting error during getrecords

Tom Kralidis tomkralidis at gmail.com
Tue Aug 26 16:03:46 PDT 2014


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-notes).

>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