[obspy-users] Fetching data via obspy.clients.arclink with unexpected gaps

Anna Makushkina makushkina at ign.ku.dk
Thu Mar 16 13:36:27 CET 2017

I'm trying to fetch event-based data via


but the data are not continuous and has some gaps, which are tough to 
get an information about for >200 stations. When I order data for such 
event (from the time gap), I get the following error:

ArcLinkException                           Traceback (most recent call last)
<ipython-input-3-4ddf45f9cfb7>  in<module>() 33 # st1.plot()34 #save the waveforms:---> 
35client.save_waveforms('./%s/%s/%s.%s..%s.mseed' %(net,stn,net, stn, 
t_event), net, stn, '', '*', t_event - 60, t_event + 240, 
format='MSEED')36 # client.save_waveforms('./%s/%s/%s.%s..%s.seed' 
%(net, stn, net, stn, comp), (net, stn, '','*' , t_event - 60, t_event + 
in save_waveforms(self, filename, network, station, location, channel, 
starttime, endtime, format, compressed, route, unpack) 564 rdata = 
[starttime, endtime, network, station, channel, location]565 # fetch 
waveform--> 566data = self._fetch(rtype, rdata, route=route)567 # check 
if data is still encrypted568 if 
in _fetch(self, request_type, request_data, route) 259 
self._reconnect()260 try:--> 261return self._request(request_type, 
request_data)262 except ArcLinkException:263 
in _request(self, request_type, request_data) 328 self._write_ln('PURGE 
%d' % req_id)329 self._bye()--> 330raise ArcLinkException('No data 
available')331 elif b'id="NODATA"' in xml_doc or b'id="ERROR"' in 
xml_doc:332 # cleanupArcLinkException: No data available

I'm wondering if it is possible to skip these "bad requests" and 
continue fetching data for the next events in the list?

My fetching command:

/from obspy import UTCDateTime//
//from obspy.clients.arclink.client import Client//
//from obspy import read_events//
//from obspy.core.event import Origin//
//client = Client('makushkina at ign.ku.dk', 'eida.gfz-potsdam.de', 18001)//
//#for stninf in stninfo://
//ts= read_events('./catalogs_2012-2016/%s_%s_events' % (net, stn))//
//for t in ts://
//event_time=t.preferred_origin().time //
//    if t_event < UTCDateTime('2015-05-20')://
//#save the waveforms://
//client.save_waveforms('./%s/%s/%s.%s..%s.mseed' %(net,stn,net, stn, 
t_event), net, stn, '', '*', t_event - 60, t_event + 240, format='MSEED') /

Thank you!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.swapbytes.de/pipermail/obspy-users/attachments/20170316/3f936bce/attachment-0001.html>

More information about the obspy-users mailing list