# using obspy.arclink.client

**URL:** https://discourse.obspy.org/t/using-obspy-arclink-client/386
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [February 3, 2015, 10:40am UTC](https://discourse.obspy.org/t/using-obspy-arclink-client/386 "2015-02-03T10:40:42Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Akiko\_To](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/a/db5fbb/32.png) [@Akiko\_To](https://discourse.obspy.org/u/Akiko_To)
#### Post date: [February 3, 2015, 10:40am UTC](https://discourse.obspy.org/t/using-obspy-arclink-client/386/1 "2015-02-03T10:40:42Z")

</div>

Dear all,

I’m trying to get waveform data by using obspy.arclink from our internal seiscomp sever.

The scart works with this sever as follows. So I think our arclink sever is running fine.  
seiscomp exec scart -s -I arclink://mulberry.jamstec.go.jp:18001 --list test1.txt --stdout \> tmp.ms

The example script given for the obspy.arclink on the web page also works ([http://docs.obspy.org/packages/autogen/obspy.arclink.client.Client.getWaveform.html](http://docs.obspy.org/packages/autogen/obspy.arclink.client.Client.getWaveform.html)).  
So I guess obspy is also running fine.

However, when I try to use obspy.arclink to get the data from our server, it does not work.  
With the following script,

---

<div class="post-metadata">

### Author: ![barsch](https://discourse.obspy.org/user_avatar/discourse.obspy.org/barsch/32/7_2.png) [@barsch](https://discourse.obspy.org/u/barsch)
#### Post date: [February 4, 2015, 1:52pm UTC](https://discourse.obspy.org/t/using-obspy-arclink-client/386/2 "2015-02-04T13:52:05Z")

</div>

Dear Akiko,

try running the client in debug mode to get more information

client = Client(host='...',port=18001,user='ttest', debug=True)  
st = client.getWaveform("PS","KI05","","HHZ", t - 3, t + 15)

Personally I never managed to get a status "CANCELLED" from an ArcLink  
server so I have no clue what could be the issue - also the docs  
([Seiscomp3 Development](http://www.seiscomp3.org/wiki/doc/applications/arclink)) only mention  
the status "CANCEL" ...

For server issue try to ask the SeisComP support  
([Seiscomp3 Development](http://www.seiscomp3.org/wiki/support)) or the EIDA mailinglist  
(eida\_maint@gfz-potsdam.de).

Hope it help,  
Robert

> Dear all,
> 
> I'm trying to get waveform data by using obspy.arclink from our  
> internal seiscomp sever.
> 
> The scart works with this sever as follows. So I think our arclink  
> sever is running fine. seiscomp exec scart -s -I  
> arclink://mulberry.jamstec.go.jp:18001 --list test1.txt --stdout \>  
> tmp.ms
> 
> The example script given for the obspy.arclink on the web page  
> also works  
> ([http://docs.obspy.org/packages/autogen/obspy.arclink.client.Client.getWaveform.html](http://docs.obspy.org/packages/autogen/obspy.arclink.client.Client.getWaveform.html)).  
> So I guess obspy is also running fine.
> 
> # However, when I try to use obspy.arclink to get the data from our server, it does not work. With the following script, ====== from obspy import UTCDateTime from obspy.arclink.client import Client client = Client(host='mulberry.jamstec.go.jp',port=18001,user='ttest') t = UTCDateTime("2009-03-20 04:03:12") st = client.getWaveform("PS","KI05","","HHZ", t - 3, t + 15) st.plot()
> 
> I get the following error.
> 
> ======= Traceback (most recent call last): File "plot\_PS\_KI.py",  
> line 6, in \<module\> st = client.getWaveform("PS","KI05","","HHZ", t  
> - 3, t + 15) File  
> "/usr/lib/python2.7/dist-packages/obspy/arclink/client.py", line  
> 426, in getWaveform compressed=compressed, route=route) File  
> "/usr/lib/python2.7/dist-packages/obspy/arclink/client.py", line  
> 545, in saveWaveform data = self.\_fetch(rtype, rdata, route=route)  
> File "/usr/lib/python2.7/dist-packages/obspy/arclink/client.py",  
> line 211, in \_fetch endtime=request\_data[1]) File  
> "/usr/lib/python2.7/dist-packages/obspy/arclink/client.py", line  
> 601, in getRouting result = self.\_fetch(rtype, rdata, route=False)  
> File "/usr/lib/python2.7/dist-packages/obspy/arclink/client.py",  
> line 205, in \_fetch return self.\_request(request\_type,  
> request\_data) File  
> "/usr/lib/python2.7/dist-packages/obspy/arclink/client.py", line  
> 309, in \_request raise ArcLinkException("%s %s" % (err\_code, msg))  
> obspy.arclink.client.ArcLinkException: CANCELLED =======
> 
> I just wonder if there are any parameters on the arclink sever,  
> which should be set up to use the obspy.arclink. Maybe I should  
> allow the user "ttest" to access the data on the arclink sever ? I  
> would appreciate it if someone who is experienced both in  
> seiscomp3 and obspy could help me.
> 
> Regards, Akiko To
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ obspy-users mailing  
> list obspy-users@lists.swapbytes.de  
> [http://lists.swapbytes.de/mailman/listinfo/obspy-users](http://lists.swapbytes.de/mailman/listinfo/obspy-users)

- --  
Dr. Robert Barsch

EGU Office Munich  
Luisenstr. 37  
80333 Munich  
Germany

Phone: +49-89-21806565  
Fax: +49-89-218017855  
eMail: barsch@egu.eu

---

<div class="post-metadata">

### Author: ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)
#### Post date: [February 4, 2015, 2:08pm UTC](https://discourse.obspy.org/t/using-obspy-arclink-client/386/3 "2015-02-04T14:08:00Z")

</div>

As an alternative option to get data from a seicomp instance.. in case  
you have the FDSN web service enabled you can also access data from your  
seiscomp using the obspy.fdsn client.

E.g. if you have a fdsn web service at the default URL on your instance  
at [http://mulberry.jamstec.go.jp:8080/fdsnws](http://mulberry.jamstec.go.jp:8080/fdsnws) then you could..

from obspy.fdsn import Client  
client = Client("[http://mulberry.jamstec.go.jp:8080](http://mulberry.jamstec.go.jp:8080)")  
st = client.get\_waveforms(....)

best,  
Tobias

---

<div class="post-metadata">

### Author: ![Akiko\_To](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/a/db5fbb/32.png) [@Akiko\_To](https://discourse.obspy.org/u/Akiko_To)
#### Post date: [February 6, 2015, 2:56am UTC](https://discourse.obspy.org/t/using-obspy-arclink-client/386/4 "2015-02-06T02:56:19Z")

</div>

Dear Robert and Tobias,

Thank you very much for the reply.  
I run the client in debug mode, but so far I'm not sure how to fix the problem.  
I'd like to also try to ask to the SC3 support and EIDA mailinglist.

Thank you for the information.  
Regards,  
Akiko To

---

<div class="post-metadata">

### Author: ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)
#### Post date: [February 6, 2015, 11:25am UTC](https://discourse.obspy.org/t/using-obspy-arclink-client/386/5 "2015-02-06T11:25:58Z")

</div>

Hi Akiko,

looks like you're request gets stuck during a routing query before the  
actual data query. You should deactivate routing, as you only query one  
specific ArcLink node and not a network of linked nodes.

Try to set `route=False` for any requests that have a `route` kwarg.

hope it helps,  
Tobias

---

<div class="post-metadata">

### Author: ![Akiko\_To](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/a/db5fbb/32.png) [@Akiko\_To](https://discourse.obspy.org/u/Akiko_To)
#### Post date: [February 6, 2015, 1:53pm UTC](https://discourse.obspy.org/t/using-obspy-arclink-client/386/6 "2015-02-06T13:53:36Z")

</div>

Dear Tobias,

Thank you very much for the reply.

It worked by setting `route=False`.

Thanks a lot.  
Regards,  
Akiko To
