ioos / pyoos

A Python library for collecting Met/Ocean observations
GNU Lesser General Public License v3.0
34 stars 33 forks source link

Cannot create a collector using `set_datum` property. #43

Closed ocefpaf closed 9 years ago

ocefpaf commented 9 years ago

(I reported this issue at https://github.com/geopython/OWSLib/issues/218, but maybe here is the appropriated place to do it.)

When creating a collector like this (using pyoos 0.6.2):

from pyoos.collectors.coops.coops_sos import CoopsSos

collector = CoopsSos()
sos_name = 'water_surface_height_above_reference_datum'

datum = 'NAVD'
collector.set_datum(datum)
collector.end_time = stop
collector.start_time = start
collector.variables = [sos_name]
response = collector.raw(responseFormat="text/csv")

I get got an unexpected keyword 'result' with OWSLib version > 0.8.9. The collector works nicely with OWSLib <= 0.8.9 though.

The only change I see that could be the culprit is the passing of the keyword argument to openURL (that is absent in previous versions):

response = openURL(base_url, data, method, username=self.username, password=self.password, **kwargs).read()
ocefpaf commented 9 years ago

OK. I found the problem and sent a PR to OWSlib.