This is the error I get using get_seismograms on a remote database when queried with a source deeper then the DB allows:
Traceback (most recent call last):
File "recsec.py", line 41, in <module>
tr = db.get_seismograms(source=src, receiver=rec, components=[component])[0]
File "/home/ex/local/src/instaseis/instaseis/base_instaseis_db.py", line 247, in get_seismograms
components=components)
File "/home/ex/local/src/instaseis/instaseis/remote_instaseis_db.py", line 121, in _get_seismograms
st = obspy.read(fh)
File "<decorator-gen-42>", line 2, in read
File "/home/ex/anaconda/lib/python2.7/site-packages/obspy/core/util/decorator.py", line 289, in _map_example_filename
return func(*args, **kwargs)
File "/home/ex/anaconda/lib/python2.7/site-packages/obspy/core/stream.py", line 217, in read
st.extend(_read(fh.name, format, headonly, **kwargs).traces)
File "<decorator-gen-43>", line 2, in _read
File "/home/ex/anaconda/lib/python2.7/site-packages/obspy/core/util/decorator.py", line 199, in uncompress_file
result = func(filename, *args, **kwargs)
File "/home/ex/anaconda/lib/python2.7/site-packages/obspy/core/stream.py", line 272, in _read
headonly=headonly, **kwargs)
File "/home/ex/anaconda/lib/python2.7/site-packages/obspy/core/util/base.py", line 439, in _read_from_plugin
raise TypeError('Unknown format for file %s' % filename)
TypeError: Unknown format for file /tmp/obspy-mWBROR.tmp
This should be catched and have a more informative message.
This is the error I get using get_seismograms on a remote database when queried with a source deeper then the DB allows:
This should be catched and have a more informative message.