astropy/astropy — pull request #2675 by mdboom (2014-07-01 15:21:41+00:00)
Title: VOTable: mask out invalid data types?

In astroquery, there are some tables returned from Vizier that have invalid datatypes such as `unsignedInt` and `unsignedShort`. `votable.parse` fails on these even with `invalid='mask'` specified:

```
In [24]: votable.parse(StringIO(V.last_response.content), pedantic=False, invalid='mask')
Traceback (most recent call last):
File "", line 1, in
votable.parse(StringIO(V.last_response.content), pedantic=False, invalid='mask')
File "/Users/adam/repos/astropy/astropy/io/votable/table.py", line 135, in parse
config=config, pos=(1, 1)).parse(iterator, config)
File "/Users/adam/repos/astropy/astropy/io/votable/tree.py", line 3335, in parse
iterator, tag, data, config, pos)
File "/Users/adam/repos/astropy/astropy/io/votable/tree.py", line 3264, in _add_resource
resource.parse(self, iterator, config)
File "/Users/adam/repos/astropy/astropy/io/votable/tree.py", line 3107, in parse
iterator, tag, data, config, pos)
File "/Users/adam/repos/astropy/astropy/io/votable/tree.py", line 3064, in _add_table
table.parse(iterator, config)
File "/Users/adam/repos/astropy/astropy/io/votable/tree.py", line 2323, in parse
iterator, tag, data, config, pos)
File "/Users/adam/repos/astropy/astropy/io/votable/tree.py", line 2238, in _add_field
field = Field(self._votable, config=config, pos=pos, **data)
File "/Users/adam/repos/astropy/astropy/io/votable/tree.py", line 1200, in __init__
self.datatype = datatype
File "/Users/adam/repos/astropy/astropy/io/votable/tree.py", line 1283, in datatype
vo_raise(E06, (datatype, self.ID), self._config, self._pos)
File "/Users/adam/repos/astropy/astropy/io/votable/exceptions.py", line 101, in vo_raise
raise exception_class(args, config, pos)
E06: None:41615:4: E06: Unknown datatype 'unsignedShort' on field 'n_HIP'

> /Users/adam/repos/astropy/astropy/io/votable/exceptions.py(101)vo_raise()
100 config = {}
--> 101 raise exception_class(args, config, pos)
102
```

Is there a workaround we can use to parse such tables in the meantime?