<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
i am new in this list and in Python, so it is possible that i <span
lang="en">ask naive issues...<br>
</span>i am looking for a specific metadata in geonetwork, according
to <a href="https://geopython.github.io/OWSLib/">owslib
documentation.</a><br>
<br>
it works well with Chrome and Firefox, using this url:<br>
<a
href="http://geonetwork-mshe.univ-fcomte.fr:8080/geonetwork/srv/fre/catalog.search#/metadata/8174d16d-240f-4199-9c2f-af6976e376b3"><a class="moz-txt-link-freetext" href="http://geonetwork-mshe.univ-fcomte.fr:8080/geonetwork/srv/fre/catalog.search#/metadata/8174d16d-240f-4199-9c2f-af6976e376b3">http://geonetwork-mshe.univ-fcomte.fr:8080/geonetwork/srv/fre/catalog.search#/metadata/8174d16d-240f-4199-9c2f-af6976e376b3</a></a><br>
<br>
but i fails with owslib. <span class="moz-smiley-s15"><span> :'( </span></span><br>
<br>
<tt>>>> geonetwork =
'<a class="moz-txt-link-freetext" href="http://geonetwork-mshe.univ-fcomte.fr:8080/geonetwork/srv/fre/csw">http://geonetwork-mshe.univ-fcomte.fr:8080/geonetwork/srv/fre/csw</a>'</tt><tt><br>
<br>
</tt><tt>>>> csw = CatalogueServiceWeb(geonetwork)</tt><tt><br>
<br>
</tt><tt>>>>
csw.getrecordbyid(id=['8174d16d-240f-4199-9c2f-af6976e376b3'])</tt><tt><br>
</tt><tt>Traceback (most recent call last):</tt><tt><br>
</tt><tt> File "<stdin>", line 1, in <module></tt><tt><br>
</tt><tt> File "/usr/lib/python2.7/dist-packages/owslib/csw.py",
line 293, in getrecordbyid</tt><tt><br>
</tt><tt> self._invoke()</tt><tt><br>
</tt><tt> File "/usr/lib/python2.7/dist-packages/owslib/csw.py",
line 647, in _invoke</tt><tt><br>
</tt><tt> self.response = openURL(self.request, None, 'Get',
username=self.username, password=self.password,
timeout=self.timeout).read()</tt><tt><br>
</tt><tt> File "/usr/lib/python2.7/dist-packages/owslib/util.py",
line 186, in openURL</tt><tt><br>
</tt><tt> **rkwargs)</tt><tt><br>
</tt><tt> File "/usr/lib/python2.7/dist-packages/requests/api.py",
line 53, in request</tt><tt><br>
</tt><tt> return session.request(method=method, url=url,
**kwargs)</tt><tt><br>
</tt><tt> File
"/usr/lib/python2.7/dist-packages/requests/sessions.py", line 468,
in request</tt><tt><br>
</tt><tt> resp = self.send(prep, **send_kwargs)</tt><tt><br>
</tt><tt> File
"/usr/lib/python2.7/dist-packages/requests/sessions.py", line 576,
in send</tt><tt><br>
</tt><tt> r = adapter.send(request, **kwargs)</tt><tt><br>
</tt><tt> File
"/usr/lib/python2.7/dist-packages/requests/adapters.py", line 437,
in send</tt><tt><br>
</tt><tt> raise ConnectionError(e, request=request)</tt><tt><br>
</tt><tt>requests.exceptions.ConnectionError:
HTTPConnectionPool(host='localhost', port=8080): Max retries
exceeded with url:
/geonetwork/srv/fre/csw?outputFormat=application%2Fxml&service=CSW&outputSchema=http%3A%2F%2Fwww.opengis.net%2Fcat%2Fcsw%2F2.0.2&request=GetRecordById&version=2.0.2&elementsetname=full&id=8174d16d-240f-4199-9c2f-af6976e376b3
(Caused by
NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection
object at 0x7fd4f8050fd0>: Failed to establish a new
connection: [Errno 111] Connection refused',))</tt><tt><br>
</tt><br>
any idea ?<br>
<br>
Thanks in advance.<br>
<br>
Ernest.<br>
<br>
<pre class="moz-signature" cols="72">--
Ernest CHIARELLO - <a class="moz-txt-link-abbreviated" href="mailto:Ernest.Chiarello@univ-fcomte.fr">Ernest.Chiarello@univ-fcomte.fr</a>
UMR6049 ThéMA -- CNRS / université de Franche-Comté
32 rue Mégevand 25030 Besançon cedex
Tel : 03 81 66 54 80 Mob : 07 82 99 11 08
</pre>
</body>
</html>