Hi all,
I’m processing some mseed files and while reading them, I got “struct.error: unpack requires a string argument of length 28”
I have tried to hack a little into the source codes throwing the error, but no luck. I would appreciate any help.
Ayodeji
The full error is below:
Traceback (most recent call last):
File “…/Data/DataProcess/DataProcDir_PPP/PPP_crosscorr_sac_parallel.py”, line 125, in
File “/home/akuponiyi/anaconda/lib/python2.7/site-packages/obspy-0.10.2-py2.7-linux-x86_64.egg/obspy/core/util/decorator.py”, line 307, in new_func
return func(*args, **kwargs)
File “/home/akuponiyi/anaconda/lib/python2.7/site-packages/obspy-0.10.2-py2.7-linux-x86_64.egg/obspy/core/stream.py”, line 231, in read
st.extend(_read(file, format, headonly, **kwargs).traces)
File “/home/akuponiyi/anaconda/lib/python2.7/site-packages/obspy-0.10.2-py2.7-linux-x86_64.egg/obspy/core/util/decorator.py”, line 215, in wrapped_func
result = func(filename, *args, **kwargs)
File “/home/akuponiyi/anaconda/lib/python2.7/site-packages/obspy-0.10.2-py2.7-linux-x86_64.egg/obspy/core/stream.py”, line 275, in _read
headonly=headonly, **kwargs)
File “/home/akuponiyi/anaconda/lib/python2.7/site-packages/obspy-0.10.2-py2.7-linux-x86_64.egg/obspy/core/util/base.py”, line 422, in _readFromPlugin
list_obj = readFormat(filename, **kwargs)
File “/home/akuponiyi/anaconda/lib/python2.7/site-packages/obspy-0.10.2-py2.7-linux-x86_64.egg/obspy/mseed/core.py”, line 229, in readMSEED
info = util.getRecordInformation(mseed_object, endian=bo)
File “/home/akuponiyi/anaconda/lib/python2.7/site-packages/obspy-0.10.2-py2.7-linux-x86_64.egg/obspy/mseed/util.py”, line 298, in getRecordInformation
info = _getRecordInformation(f, offset=offset, endian=endian)
File “/home/akuponiyi/anaconda/lib/python2.7/site-packages/obspy-0.10.2-py2.7-linux-x86_64.egg/obspy/mseed/util.py”, line 385, in _getRecordInformation
values = unpack(fmt(endian), data) # values = unpack(fmt(endian), data)
struct.error: unpack requires a string argument of length 28