I'm using the latest OWSlib code (code that fixed issue 78), and still getting an error getting records from this CSW. Note sure if this is an OWSLib problem or a provider problem:
from owslib.csw import CatalogueServiceWeb
endpoint = 'http://cwic.csiss.gmu.edu/cwicv1/discovery'
csw = CatalogueServiceWeb(endpoint,timeout=60)
csw.getrecords2(maxrecords=2)
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
<ipython-input-7-3cf19d5d4035> in <module>()
----> 1 csw.getrecords2(maxrecords=2)
C:\Users\rsignell\AppData\Local\Enthought\Canopy32\User\lib\site-packages\owslib-0.7_dev-py2.7.egg\owslib\csw.pyc in getrecords2(self, constraints, sortby, typenames, esn, outputschema, format, startposition, maxrecords, cql, xml, resulttype)
339 self.request = node0
340
--> 341 self._invoke()
342
343 if self.exceptionreport is None:
C:\Users\rsignell\AppData\Local\Enthought\Canopy32\User\lib\site-packages\owslib-0.7_dev-py2.7.egg\owslib\csw.pyc in _invoke(self)
573 self.request = util.xml2string(etree.tostring(self.request))
574
--> 575 self.response = util.http_post(self.url, self.request, self.lang, self.timeout)
576
577 # parse result see if it's XML
C:\Users\rsignell\AppData\Local\Enthought\Canopy32\User\lib\site-packages\owslib-0.7_dev-py2.7.egg\owslib\util.pyc in http_post(url, request, lang, timeout)
285
286 try:
--> 287 up = urllib2.urlopen(r,timeout=timeout);
288 except TypeError:
289 import socket
C:\Users\rsignell\AppData\Local\ENTHOU~1\Canopy32\App\appdata\canopy-1.0.3.1262.win-x86\lib\urllib2.pyc in urlopen(url, data, timeout)
124 if _opener is None:
125 _opener = build_opener()
--> 126 return _opener.open(url, data, timeout)
127
128 def install_opener(opener):
C:\Users\rsignell\AppData\Local\ENTHOU~1\Canopy32\App\appdata\canopy-1.0.3.1262.win-x86\lib\urllib2.pyc in open(self, fullurl, data, timeout)
404 for processor in self.process_response.get(protocol, []):
405 meth = getattr(processor, meth_name)
--> 406 response = meth(req, response)
407
408 return response
C:\Users\rsignell\AppData\Local\ENTHOU~1\Canopy32\App\appdata\canopy-1.0.3.1262.win-x86\lib\urllib2.pyc in http_response(self, request, response)
517 if not (200 <= code < 300):
518 response = self.parent.error(
--> 519 'http', request, response, code, msg, hdrs)
520
521 return response
C:\Users\rsignell\AppData\Local\ENTHOU~1\Canopy32\App\appdata\canopy-1.0.3.1262.win-x86\lib\urllib2.pyc in error(self, proto, *args)
442 if http_err:
443 args = (dict, 'default', 'http_error_default') + orig_args
--> 444 return self._call_chain(*args)
445
446 # XXX probably also want an abstract factory that knows when it makes
C:\Users\rsignell\AppData\Local\ENTHOU~1\Canopy32\App\appdata\canopy-1.0.3.1262.win-x86\lib\urllib2.pyc in _call_chain(self, chain, kind, meth_name, *args)
376 func = getattr(handler, meth_name)
377
--> 378 result = func(*args)
379 if result is not None:
380 return result
C:\Users\rsignell\AppData\Local\ENTHOU~1\Canopy32\App\appdata\canopy-1.0.3.1262.win-x86\lib\urllib2.pyc in http_error_default(self, req, fp, code, msg, hdrs)
525 class HTTPDefaultErrorHandler(BaseHandler):
526 def http_error_default(self, req, fp, code, msg, hdrs):
--> 527 raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
528
529 class HTTPRedirectHandler(BaseHandler):
HTTPError: HTTP Error 500: Internal Server Error