astropy table ligolw read does not work with python-ligo-lw >= 1.7.0
Created by: lpsinger
Reading ligolw tables using astropy is broken with python-ligo-lw >= 1.7.0. The last version in which it worked was python-ligo-lw==1.6.0.
$ cat test.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE LIGO_LW SYSTEM "http://ldas-sw.ligo.caltech.edu/doc/ligolwAPI/html/ligolw_dtd.txt">
<LIGO_LW>
<Table Name="process:table">
<Column Name="comment" Type="lstring"/>
<Column Name="cvs_entry_time" Type="int_4s"/>
<Column Name="cvs_repository" Type="lstring"/>
<Column Name="domain" Type="lstring"/>
<Column Name="end_time" Type="int_4s"/>
<Column Name="ifos" Type="lstring"/>
<Column Name="is_online" Type="int_4s"/>
<Column Name="jobid" Type="int_4s"/>
<Column Name="node" Type="lstring"/>
<Column Name="process_id" Type="int_8s"/>
<Column Name="program" Type="lstring"/>
<Column Name="start_time" Type="int_4s"/>
<Column Name="unix_procid" Type="int_4s"/>
<Column Name="username" Type="lstring"/>
<Column Name="version" Type="lstring"/>
<Stream Name="process:table" Delimiter="," Type="Local">
"5.4323988842610714e-05 1 / (Mpc3 yr)",,,,1287835890,,0,0,"r903i2n1",0,"bayestar-inject",1287835294,13112,"lpsinger","ligo.skymap 0.5.0",
"Simulated coincidences",,,,1287865737,"H1,L1,V1",0,0,"r903i2n1",1,"bayestar-realize-coincs",1287835933,13358,"lpsinger","ligo.skymap 0.5.0"
</Stream>
</Table>
</LIGO_LW>
>>> import gwpy.table
>>> from astropy.table import Table
>>> Table.read('test.xml', format='ligolw', tablename='process')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/private/tmp/env/lib/python3.8/site-packages/astropy/table/connect.py", line 61, in __call__
out = registry.read(cls, *args, **kwargs)
File "/private/tmp/env/lib/python3.8/site-packages/astropy/io/registry.py", line 520, in read
data = reader(*args, **kwargs)
File "/private/tmp/env/lib/python3.8/site-packages/gwpy/table/io/utils.py", line 67, in wrapper
tab = func(*args, **kwargs)
File "/private/tmp/env/lib/python3.8/site-packages/gwpy/table/io/ligolw.py", line 411, in read_table
return Table(read_ligolw_table(source, tablename=tablename, **read_kw),
File "/private/tmp/env/lib/python3.8/site-packages/astropy/table/table.py", line 510, in __init__
data = data.__astropy_table__(self.__class__, copy, **kwargs)
File "/private/tmp/env/lib/python3.8/site-packages/gwpy/table/io/ligolw.py", line 173, in to_astropy_table
return apytable(data, copy=False, meta={'tablename': str(llwtable.Name)})
File "/private/tmp/env/lib/python3.8/site-packages/astropy/table/table.py", line 626, in __init__
init_func(data, names, dtype, n_cols, copy)
File "/private/tmp/env/lib/python3.8/site-packages/astropy/table/table.py", line 967, in _init_from_list
self._init_from_cols(cols)
File "/private/tmp/env/lib/python3.8/site-packages/astropy/table/table.py", line 1161, in _init_from_cols
lengths = set(len(col) for col in cols)
File "/private/tmp/env/lib/python3.8/site-packages/astropy/table/table.py", line 1161, in <genexpr>
lengths = set(len(col) for col in cols)
TypeError: len() of unsized object