Endian problem with some traces

Hi, I am using Obspy and I am having the noext error with some traces:

ValueError                                Traceback (most recent call last)
<ipython-input-7-c50b5ea74ebd> in <module>
      4 response=client.get_availability(network="TC", channel='*', station='ULMZ')
      5 print(response)
----> 6 st=client.get_waveforms('TC', 'ULMZ', 'BB', 'HHZ',UTCDateTime(2020,7,24,0,0,0) , UTCDateTime(2020,7,24,0,0,1))
      7 print(st)

c:\python36\lib\site-packages\obspy\clients\earthworm\client.py in get_waveforms(self, network, station, location, channel, starttime, endtime, cleanup)
    111         tbl = read_wave_server_v(self.host, self.port, scnl, starttime,
    112                                  endtime, timeout=self.timeout,
--> 113                                  cleanup=cleanup)
    114         # create new stream
    115         st = Stream()

c:\python36\lib\site-packages\obspy\clients\earthworm\waveserver.py in read_wave_server_v(server, port, scnl, start, end, timeout, cleanup)
    291         new_tb = TraceBuf2()
--> 292         new_tb.parse_header(dat[p:p + 64])
    293         p += 64
    294         nbytes = new_tb.ndata * new_tb.input_type.itemsize

c:\python36\lib\site-packages\obspy\clients\earthworm\waveserver.py in parse_header(self, head)
     88             endian = b'<'
     89         else:
---> 90             raise ValueError
     91         self.input_type = get_numpy_type(dtype)
     92         (self.pinno, self.ndata, ts, te, self.rate, self.sta, self.net,


Can you please post a short code example to reproduce? What server are you connecting to? Is it openly available?

Hi @megies, i’m a teammate of Luis, i can reply that:

We’re having troubles with the “parse_header” function in the waveserver.py library (using earthworm client), when ge try to load data comming from a Kinemetrics Rock digitizer (Basalt) we get dtype[0:1] = ‘0s’, and ‘0’ are’nt in the options:

  if dtype[0:1] in b'ts':
        endian = b'>'
    elif dtype[0:1] in b'if':
        endian = b'<'

Thanks!, greetings from Chile!

Hmm… the earthworm client code came from an external contributor, and there is no documentation on the standard in our repository. So, no idea what the standard says about this particular flag and allowed values. You could maybe ask the people at ISTI if they know what is going on, I think they work with earthworm a lot.

1 Like

Thanks! i will try over there!