Reading ASCII series file with header fails on checking whether the file is a cache
Trying to read an ASCII-format data file that includes a comment header results in a RuntimeError
:
$ python -c "from gwpy.timeseries import TimeSeries; print(TimeSeries.read('GWBNS.dat', format='txt', skiprows=1))"
/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/astropy/version.py:26: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
for j, piece in enumerate(LooseVersion(version).version[:3]):
XLAL Error - new_tagLIGOTimeGPS__SWIG_3 (swiglal_python.c<lal>:10738): 'time' is not a valid LIGOTimeGPS
XLAL Error - new_tagLIGOTimeGPS__SWIG_3 (swiglal_python.c<lal>:10738): Invalid argument
XLAL Error - new_tagLIGOTimeGPS__SWIG_3 (swiglal_python.c<lal>:10738): '(s)' is not a valid LIGOTimeGPS
XLAL Error - new_tagLIGOTimeGPS__SWIG_3 (swiglal_python.c<lal>:10738): Invalid argument
Traceback (most recent call last):
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/io/cache.py", line 118, in parse
return _parse_entry_ffl(parts, gpstype=gpstype)
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/io/cache.py", line 86, in _parse_entry_ffl
start = gpstype(start)
RuntimeError: Invalid argument
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/timeseries/core.py", line 311, in read
return timeseries_reader(cls, source, *args, **kwargs)
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/timeseries/io/core.py", line 33, in read
if io_cache.is_cache(source):
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/io/cache.py", line 285, in is_cache
return bool(len(read_cache(cache)))
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/io/utils.py", line 144, in wrapped_func
return func(*args, **kwargs)
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/io/cache.py", line 190, in read_cache
cache = [x.path for x in _iter_cache(cachefile, gpstype=coltype)]
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/io/cache.py", line 190, in <listcomp>
cache = [x.path for x in _iter_cache(cachefile, gpstype=coltype)]
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/io/cache.py", line 142, in _iter_cache
yield _CacheEntry.parse(line, gpstype=gpstype)
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/io/cache.py", line 121, in parse
return _parse_entry_lal(parts, gpstype=gpstype)
File "/home/duncan/opt/mambaforge/envs/py39/lib/python3.9/site-packages/gwpy/io/cache.py", line 73, in _parse_entry_lal
start = gpstype(start)
RuntimeError: Invalid argument