Skip to content

cdms2.open fails on an xml file with "invalid" attributes #1942

@durack1

Description

@durack1

The following error output from ipython should explain the error enough. The .xml input file was generated using cdscan - same version as the uvcdat:

In [2]: fh = cdm.open('ORAS4_1958-2014.xml')
error near line 17: invalid attribute value positive=unknown of element axis, must be one of ('up', 'down')
---------------------------------------------------------------------------                                
AssertionError                            Traceback (most recent call last)                                
<ipython-input-2-c0e2c24bde85> in <module>()                                                               
----> 1 fh = cdm.open('ORAS4_1958-2014.xml')                                                               

/usr/local/uvcdat/2016-03-09/lib/python2.7/site-packages/cdms2/dataset.pyc in openDataset(uri, mode, template, dods, dpath, hostObj)
...

/usr/local/uvcdat/2016-03-09/lib/python2.7/site-packages/cdms2/cdmsNode.pyc in validate(self, idtable)
    359                 if type(atttype) is TupleType:
    360                     attval=self.getExternalAttr(attname)
--> 361                     assert attval in atttype, 'Invalid attribute %s=%s must be in %s'%(attname,attval,`atttype`)
    362                 elif atttype==CDML.Idref:
    363                     attval=self.getExternalAttr(attname)

AssertionError: Invalid attribute positive=unknown must be in ('up', 'down')

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions