[pycsw-devel] AttributeError: 'module' object has no attribute 'get_config'

Junichi Nagai Nagai.Junichi at imslab.co.jp
Mon Jul 25 06:25:03 EDT 2011


Hi Tom,

I'm Junichi.
Thank you for the info.

> Hi: thanks for the info. Do you have multiple Python installations on your 
> machine? Make sure the Python that  PostgreSQL uses for plpython functions 
> is the same used for pycsw itself (and it has lxml installed).

> ..Tom

I didn't set "PYTHONPATH".
I set "PYTHONPATH".
It disappeared the bellow error.

> ------------------------------------------------------------
> <ows:Exception locator="constraint" exceptionCode="InvalidParameterValue">
> <ows:ExceptionText>Invalid query: (InternalError) plpython: function
> "query_spatial" failed
> DETAIL: &lt;type 'exceptions.ImportError'&gt;: No module named lxml
> "SELECT records.identifier AS records_identifier, records.typename AS
> records_typename, records.schema AS records_schema, records.bbox AS
> records_bbox, records.xml AS records_xml, records.source AS 
> records_source,
> records.insert_date AS records_insert_date \nFROM records \nWHERE
> records.typename IN (%(typename_1)s) AND 
> query_spatial(bbox,'POLYGON((-5.00
> 47.00, -5.00 55.00, 20.00 55.00, 20.00 47.00, -5.00 
> 47.00))','bbox','false')
> = 'true'" {'typename_1': 'csw:Record'}</ows:ExceptionText>
> </ows:Exception>
> ------------------------------------------------------------


But, it appeared next error.
(at (3)  I sent "GetRecords-filter-bbox Request" to my pycsw server.)

------------------------------------------------------------
<ows:Exception locator="constraint" exceptionCode="InvalidParameterValue">
<ows:ExceptionText>Invalid query: (InternalError) plpython: function
"query_spatial" failed
DETAIL:  <type 'exceptions.ImportError'>: DLL load failed
"SELECT records.identifier AS records_identifier, records.typename AS
records_typename, records.schema AS records_schema, records.bbox AS
records_bbox, records.xml AS records_xml, records.source AS records_source,
records.insert_date AS records_insert_date \nFROM records \nWHERE
records.typename IN (%(typename_1)s) AND query_spatial(bbox,'POLYGON((-5.00
47.00, -5.00 55.00, 20.00 55.00, 20.00 47.00, -5.00 47.00))','bbox','false')
= 'true'" {'typename_1': 'csw:Record'}</ows:ExceptionText>
</ows:Exception>
------------------------------------------------------------

Do I need DLL path or anything?

my environment variable is below.
path : C:\Python27;
PYTHONPATH : C:\Python27\Lib\site-packages


..Junichi


----------------------------------------
> From: Nagai.Junichi at imslab.co.jp
> To: pycsw-devel at lists.sourceforge.net
> Date: Fri, 22 Jul 2011 12:45:58 +0900
> Subject: Re: [pycsw-devel] AttributeError: 'module' object has no 
> attribute 'get_config'
>
> Dear Tom Kralidis,
>
> I'm Junichi Nagai.
>
> Thank you for updating configuration parsing.
> It works about creating the necessary tables and values for the 
> repository.
>
> But I got another problem.
> (different from [pycsw-devel] About "GetRecords-filter-bbox Request")
>
> I imported all *.xml records(pycsw samples) by using
> "./sbin/load_records.py".
>
> (1)
> I sent "GetRecords-all Request" to my pycsw
> server(http://localhost/cgi-bin/pycsw/csw.py) at
> "http://localhost/tester/index.html".
>
> I got collect response from my pycsw
> server(http://localhost/cgi-bin/pycsw/csw.py) at
> "http://localhost/tester/index.html".
>
> No problem.
>
>
> (2)
> I sent "GetRecords-Element Request" to my pycsw server.
> I got collect response.
>
> No problem.
>
>
> (3)
> I sent "GetRecords-filter-bbox Request" to my pycsw server.
> I couldn't got collect response.
>
> I got below error.
> ------------------------------------------------------------
> <ows:Exception locator="constraint" exceptionCode="InvalidParameterValue">
> <ows:ExceptionText>Invalid query: (InternalError) plpython: function
> "query_spatial" failed
> DETAIL: &lt;type 'exceptions.ImportError'&gt;: No module named lxml
> "SELECT records.identifier AS records_identifier, records.typename AS
> records_typename, records.schema AS records_schema, records.bbox AS
> records_bbox, records.xml AS records_xml, records.source AS 
> records_source,
> records.insert_date AS records_insert_date \nFROM records \nWHERE
> records.typename IN (%(typename_1)s) AND 
> query_spatial(bbox,'POLYGON((-5.00
> 47.00, -5.00 55.00, 20.00 55.00, 20.00 47.00, -5.00 
> 47.00))','bbox','false')
> = 'true'" {'typename_1': 'csw:Record'}</ows:ExceptionText>
> </ows:Exception>
> ------------------------------------------------------------
>
> I have installed "lxml version 2.3".
> It works for (1),(2).
>
> I think that "FUNCTION_QUERY_SPATIAL" of database don't know where "lxml"
> is.
>
>
> Could you tell me what's wrong?
>
>
> I use below.
> pycsw:version1.0.0(http://sourceforge.net/projects/pycsw/files/1.0.0/)
> OS:Windows XP
> Python:Version 2.7
> Database:postgres8.3
> lxml:version 2.3
>
>
> ------------------------------------------------------------------------------
> 10 Tips for Better Web Security
> Learn 10 ways to better secure your business today. Topics covered 
> include:
> Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
> security Microsoft Exchange, secure Instant Messaging, and much more.
> http://www.accelacomm.com/jaw/sfnl/114/51426210/
> _______________________________________________
> pycsw-devel mailing list
> pycsw-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pycsw-devel
 





More information about the Pycsw-devel mailing list