<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Dear All,</p>
<p><br>
</p>
<p>I was doing some tests using <span>CatalogueServiceWeb and the data.gov CSW.</span></p>
<p><span><br>
</span></p>
<p><span style="font-size: 12pt;">Basically doing something like:</span><br>
</p>
<p><span><br>
</span></p>
<p><span></p>
<div>from owslib.csw import CatalogueServiceWeb</div>
<div>from owslib.fes import PropertyIsEqualTo, PropertyIsLike, BBox</div>
<div>csw = CatalogueServiceWeb('http://catalog.data.gov/csw?service=CSW&version=2.0.2&request=GetCapabilities')</div>
<div>query = PropertyIsEqualTo('csw:AnyText', 'map')</div>
<div>csw.getrecords2(constraints=[query], maxrecords=20)</div>
<div>print(csw.records)</div>
<div><br>
</div>
<div>i got:</div>
<div><br>
</div>
<div>
<div>*python3.5/site-packages/owslib/csw.py in getrecords2(self, constraints, sortby, typenames, esn, outputschema, format, startposition, maxrecords, cql, xml, resulttype)</div>
<div>    380 </div>
<div>    381             # process search results attributes</div>
<div>--> 382             val = self._exml.find(util.nspath_eval('csw:SearchResults', namespaces)).attrib.get('numberOfRecordsMatched')</div>
<div>    383             self.results['matches'] = int(util.testXMLValue(val, True))</div>
<div>    384             val = self._exml.find(util.nspath_eval('csw:SearchResults', namespaces)).attrib.get('numberOfRecordsReturned')</div>
<div><br>
</div>
<div>AttributeError: 'NoneType' object has no attribute 'attrib'</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div>Ideas?</div>
<div><br>
</div>
<div>D</div>
<div><br>
</div>
<br>
<br>
</span>
<p></p>
</div>
</body>
</html>