frread.read_timeseries: "untrapped XLAL error" when source file not found; switch from LALFrOpen to XLALFrStreamOpen?
@duncanmmacleod : Just discovered your lalframe.frread and find it quite useful for quickly getting a raw h(t) numpy array. However I noticed an unclean error message when a nonexistent source file path is given:
from lalframe import frread
>>> hoft = frread.read_timeseries(source='not-a-file.gwf', channel='H1:SOMETHING')
XLAL Error - XLALCacheGlob (LALCache.c:350): No matching files found in /home/dkeitel/not-a-file.gwf
XLAL Error - XLALCacheGlob (LALCache.c:350): I/O error
XLAL Error - XLALFrStreamOpen (LALFrStream.c:260): Internal function call failed: I/O error
Error[1] -32: function LALFrOpen, file LALFrStreamLegacy.c, line 70, $Id$
ABORT: RETURN: untrapped XLAL error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dkeitel/programs/lalsuite/lib/python2.7/site-packages/lalframe/frread.py", line 139, in read_timeseries
verbose=verbose)
File "/home/dkeitel/programs/lalsuite/lib/python2.7/site-packages/lalframe/frread.py", line 206, in ts_from_frame_file
stream = lalframe.FrOpen('', framefile)
RuntimeError: RETURN: untrapped XLAL error
I had a quick look into the source code and since LALFrOpen (FrOpen from python) comes from a file called "LALFrStreamLegacy.c" and is marked as deprecated anyway, I was wondering if it's worth switching to XLALFrStreamOpen (FrStreamOpen from python)?
Though if this package is not really maintained anymore (in favour of gwpy?), feel free to say WONTFIX, as I can confirm when passing an existing file it still seems to do what I want.