[OWSLib-devel] bug in SOS 1.0.0 get_observation?

Kyle Wilcox KWilcox at asascience.com
Fri Nov 1 12:02:48 PDT 2013


Hi Joe -

Thanks for the report!  This was fixed a few weeks ago but there has not been an OWSLib release yet:
https://github.com/geopython/OWSLib/commit/5a79acccebbfe310c8ceb9f5532e32991510d8d1

If you install OWSLib using this command it should work as expected:  `pip install git+https://github.com/geopython/OWSLib.git`

> -----Original Message-----
> From: owslib-devel-bounces at lists.osgeo.org [mailto:owslib-devel-
> bounces at lists.osgeo.org] On Behalf Of Joe Futrelle
> Sent: Friday, November 01, 2013 2:41 PM
> To: owslib-devel at lists.osgeo.org
> Subject: [OWSLib-devel] bug in SOS 1.0.0 get_observation?
> 
> I hope I'm posting this to the right list.
> 
> Reading the owslib/swe/observation/sos100.py it appears that
> get_observation only returns a response in exception handlers. When all
> those fall through it returns None, which I don't think is correct.
> 
> This is in release version 0.8.2, here's the offending section of the code:
> 
>          response = openURL(base_url, data, method,
> username=self.username, password=self.password).read()
>          try:
>              tr = etree.fromstring(response)
>              if tr.tag == nspath_eval("ows:ExceptionReport", namespaces):
>                  raise ows.ExceptionReport(tr)
>          except ows.ExceptionReport:
>              raise
>          except BaseException:
>              return response
> 
> I think the fix is just to add a return clause immediately after the except
> clauses?
> 
> Apologies if this is me not understanding the API.
> 
> Or if this has already been patched.
> 
> And the other usual disclaimers.
> 
> --
> Joe Futrelle
> Woods Hole Oceanographic Institution
> jfutrelle at whoi.edu
> 
> _______________________________________________
> OWSLib-devel mailing list
> OWSLib-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/owslib-devel


More information about the OWSLib-devel mailing list