[OWSLib-devel] SOS 2.0

Andrew Watkins Andrew.Watkins at niwa.co.nz
Wed Dec 3 16:03:16 PST 2014


Hi Folks
I’m new to the list.  So please forgive possibly naive questions.

Looking at sos200.py we have
    def __getitem__(self,id):
        ''' check contents dictionary to allow dict like access to service observational offerings'''
        if name in self.__getattribute__('contents').keys():
            return self.__getattribute__('contents')[id]
        else:
            raise KeyError, "No Observational Offering with id: %s" % id


Is the use of ‘name’ here correct?  Should it be ‘id’ ?

If you run it then you get

NameError: global name 'name' is not defined

Thanks Andrew



Andrew Watkins
Systems Development Manager

+64-9-375-2069 | +64-27-703-1007 | 41 Market Place, Viaduct Harbour, Auckland | www.niwa.co.nz<http://www.niwa.co.nz>
[NIWA]<http://www.niwa.co.nz>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/owslib-devel/attachments/20141204/405e9a5c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image062f7f.JPG
Type: image/jpeg
Size: 20819 bytes
Desc: image062f7f.JPG
URL: <http://lists.osgeo.org/pipermail/owslib-devel/attachments/20141204/405e9a5c/attachment-0001.jpe>


More information about the OWSLib-devel mailing list