Can't read data from winston wavserver with wildcards

I’m having problems reading data into a stream from a winston waveserver. It works OK if I specify a single SCNL, but crashes if I try to use wildcards or a comma-separated list - both of which which the documentation says are allowed.

My code is:

st = client.get_waveforms( "MV", "M*", "*", "*Z", datimBeg, datimEnd)

And the crash is:

Traceback (most recent call last):
  File "./", line 150, in <module>
  File "./", line 124, in main
    st = client.get_waveforms( "MV", "M*", "*", "*Z", datimBeg, datimEnd)
  File "/home/seisan/anaconda3/envs/obspy/lib/python3.8/site-packages/obspy/clients/earthworm/", line 111, in get_waveforms
    tbl = read_wave_server_v(, self.port, scnl, starttime,
  File "/home/seisan/anaconda3/envs/obspy/lib/python3.8/site-packages/obspy/clients/earthworm/", line 273, in read_wave_server_v
    print(msg % (flag, RETURNFLAG_KEY[flag]), file=sys.stderr)
KeyError: '*'

According to docs, wildcards only allowed in channel, which is likely a restraint of the protocol, not sure.

It’s easy to assemble the list of stations though:

from obspy import UTCDateTime, Stream
from obspy.clients.earthworm import Client

t = UTCDateTime() - 1000

client = Client("", 16022)

info = client.get_availability(network='AV', station='AK*', channel='*Z')

st = Stream()
for net, sta, loc, cha, start, end in info:
    st += client.get_waveforms(net, sta, loc, cha, t, t + 10) 


Thanks. I’m slowly getting the hang of this.

1 Like