[OWSLib-users] CatalogueServiceWeb and data.gov exception
Davide Muraro
muraro_davide at hotmail.com
Thu Jun 1 04:43:38 PDT 2017
Dear All,
I was doing some tests using CatalogueServiceWeb and the data.gov CSW.
Basically doing something like:
from owslib.csw import CatalogueServiceWeb
from owslib.fes import PropertyIsEqualTo, PropertyIsLike, BBox
csw = CatalogueServiceWeb('http://catalog.data.gov/csw?service=CSW&version=2.0.2&request=GetCapabilities')
query = PropertyIsEqualTo('csw:AnyText', 'map')
csw.getrecords2(constraints=[query], maxrecords=20)
print(csw.records)
i got:
*python3.5/site-packages/owslib/csw.py in getrecords2(self, constraints, sortby, typenames, esn, outputschema, format, startposition, maxrecords, cql, xml, resulttype)
380
381 # process search results attributes
--> 382 val = self._exml.find(util.nspath_eval('csw:SearchResults', namespaces)).attrib.get('numberOfRecordsMatched')
383 self.results['matches'] = int(util.testXMLValue(val, True))
384 val = self._exml.find(util.nspath_eval('csw:SearchResults', namespaces)).attrib.get('numberOfRecordsReturned')
AttributeError: 'NoneType' object has no attribute 'attrib'
Ideas?
D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/owslib-users/attachments/20170601/80e9b497/attachment.html>
More information about the OWSLib-users
mailing list