<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,
<br>
<br>
I'm trying to get the records from this csw : <a
class="moz-txt-link-freetext"
href="http://www.data.eaufrance.fr:/geosource/srv/eng/csw">http://www.data.eaufrance.fr:/geosource/srv/eng/csw</a>?
<br>
Getting one record with getrecordbyid works ok, but my request is
rejected when I use getrecords2 or getrecords.
<br>
<br>
Here's a snippet of code for Python2.7 :
<br>
from owslib.csw import CatalogueServiceWeb
<br>
url = '<a class="moz-txt-link-freetext"
href="http://www.data.eaufrance.fr:/geosource/srv/eng/csw">http://www.data.eaufrance.fr:/geosource/srv/eng/csw</a>?'
<br>
csw = CatalogueServiceWeb(url)
<br>
csw.getrecords2()
<br>
<br>
And here's the error I get :
<br>
Traceback (most recent call last):
<br>
File "<stdin>", line 1, in <module>
<br>
File "/usr/local/lib/python2.7/dist-packages/owslib/csw.py",
line 376, in getrecords2
<br>
self._invoke()
<br>
File "/usr/local/lib/python2.7/dist-packages/owslib/csw.py",
line 676, in _invoke
<br>
self._exml = etree.parse(BytesIO(self.response))
<br>
File "src/lxml/lxml.etree.pyx", line 3427, in lxml.etree.parse
(src/lxml/lxml.etree.c:85131)
<br>
File "src/lxml/parser.pxi", line 1799, in
lxml.etree._parseDocument (src/lxml/lxml.etree.c:124241)
<br>
File "src/lxml/parser.pxi", line 1819, in
lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:124533)
<br>
File "src/lxml/parser.pxi", line 1707, in lxml.etree._parseDoc
(src/lxml/lxml.etree.c:123074)
<br>
File "src/lxml/parser.pxi", line 1079, in
lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:117114)
<br>
File "src/lxml/parser.pxi", line 573, in
lxml.etree._ParserContext._handleParseResultDoc
(src/lxml/lxml.etree.c:110510)
<br>
File "src/lxml/parser.pxi", line 683, in
lxml.etree._handleParseResult (src/lxml/lxml.etree.c:112276)
<br>
File "src/lxml/parser.pxi", line 613, in
lxml.etree._raiseParseError (src/lxml/lxml.etree.c:111124)
<br>
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: br
line 1 and body, line 1, column 242
<br>
<br>
If I then try :
<br>
csw.response
<br>
<br>
I get :
<br>
"<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='<a
class="moz-txt-link-freetext">javascript:history.back()</a>;'>[Go
Back]</a></body></html>"
<br>
<br>
getrecordbyid works fine.
<br>
<br>
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 ?
<br>
<br>
Thanks a lot,
<br>
<br>
Julie.
</p>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>