[OWSLib-users] csw getrecords2 : request rejected
Julie Pierson
julie.pierson at cnrs.fr
Tue Jul 31 07:41:04 PDT 2018
Hi all,
I'm trying to get the records from this csw :
http://www.data.eaufrance.fr:/geosource/srv/eng/csw?
Getting one record with getrecordbyid works ok, but my request is
rejected when I use getrecords2 or getrecords.
Here's a snippet of code for Python2.7 :
from owslib.csw import CatalogueServiceWeb
url = 'http://www.data.eaufrance.fr:/geosource/srv/eng/csw?'
csw = CatalogueServiceWeb(url)
csw.getrecords2()
And here's the error I get :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/owslib/csw.py", line
376, in getrecords2
self._invoke()
File "/usr/local/lib/python2.7/dist-packages/owslib/csw.py", line
676, in _invoke
self._exml = etree.parse(BytesIO(self.response))
File "src/lxml/lxml.etree.pyx", line 3427, in lxml.etree.parse
(src/lxml/lxml.etree.c:85131)
File "src/lxml/parser.pxi", line 1799, in lxml.etree._parseDocument
(src/lxml/lxml.etree.c:124241)
File "src/lxml/parser.pxi", line 1819, in
lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:124533)
File "src/lxml/parser.pxi", line 1707, in lxml.etree._parseDoc
(src/lxml/lxml.etree.c:123074)
File "src/lxml/parser.pxi", line 1079, in
lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:117114)
File "src/lxml/parser.pxi", line 573, in
lxml.etree._ParserContext._handleParseResultDoc
(src/lxml/lxml.etree.c:110510)
File "src/lxml/parser.pxi", line 683, in
lxml.etree._handleParseResult (src/lxml/lxml.etree.c:112276)
File "src/lxml/parser.pxi", line 613, in lxml.etree._raiseParseError
(src/lxml/lxml.etree.c:111124)
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: br line 1
and body, line 1, column 242
If I then try :
csw.response
I get :
"<html><head><title>Request Rejected</title></head><body>The requested
URL was rejected. Please consult with your administrator.<br><br>Your
support ID is: 16327421591402261030<br><br><a
href='javascript:history.back();'>[Go Back]</a></body></html>"
getrecordbyid works fine.
Do you know if this issue is related to the server I'm querying, or if
this is a bug ? Do you have any idea which direction I should try
looking into ?
Thanks a lot,
Julie.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/owslib-users/attachments/20180731/717eda92/attachment.html>
More information about the OWSLib-users
mailing list