weixin_39747577 2020-11-20 20:17
浏览 1

metadata problems with arclink

Currently there is an error when fetching metadata from arclink: {{{

!python

from obspy.core import UTCDateTime from obspy.arclink import Client client = Client(host="webdc.eu", port=18001) t = UTCDateTime("2009-08-24 00:20:03") paz = client.getPAZ('BW', 'RJOB', '', 'EHZ', t, t+30) }}} {{{

!python

XMLSyntaxError Traceback (most recent call last)

/home/megies/ in ()

/home/megies/obspy/obspy.arclink/trunk/obspy/arclink/client.pyc in getPAZ(self, network_id, station_id, location_id, channel_id, start_datetime, end_datetime) 501 xml_doc = self._fetch(rtype, [rdata]) 502 # generate object by using XML schema --> 503 xml_doc = objectify.fromstring(xml_doc, self.inventory_parser) 504 if not xml_doc.countchildren(): 505 return {}

/usr/lib/python2.5/site-packages/lxml/objectify.so in lxml.objectify.fromstring (src/lxml/lxml.objectify.c:16186)()

/usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree.fromstring (src/lxml/lxml.etree.c:21907)()

/usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:60613)()

/usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._parseDoc (src/lxml/lxml.etree.c:59530)()

/usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:56815)()

/usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:53512)()

/usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:54372)()

/usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:53770)()

XMLSyntaxError: Element '{http://geofon.gfz-potsdam.de/ns/Inventory/1.0/}inventory': No matching global declaration available for the validation root. }}}

该提问来源于开源项目:obspy/obspy

  • 写回答

5条回答 默认 最新

  • weixin_39747577 2020-11-20 20:17
    关注

    [megies] transmission via arclink is OK: {{{

    !python

    In [9]: client = Client(host="webdc.eu", port=18001, debug=True)

    In [10]: paz = client.getPAZ('BW', 'RJOB', '', 'EHZ', t, t+30)

    HELLO ... ArcLink v1.1 (2009.085) ... GFZ USER Anonymous ... OK INSTITUTION Anonymous ... OK REQUEST INVENTORY instruments=true 2009,8,24,0,20,3,0 2009,8,24,0,20,33,0 BW RJOB EHZ END ... OK STATUS ... 238958 STATUS 238958 ... ERROR STATUS 238958 ... <?xml version="1.0"?> END STATUS 238958 ... <?xml version="1.0"?> END DOWNLOAD 238958 <?xml version="1.0" encoding="utf-8"?> /ns0:sensorLocation /ns0:station /ns0:network /ns0:stationGroup ns0:digitalFilterChainResponseFIR#20100423181043.804276.24964 ResponseFIR#20100423181043.883242.24965/ns0:digitalFilterChain /ns0:decimation /ns0:datalogger /ns0:sensor ns0:coefficients-8.7308e-08 -3.51931e-07 -9.71925e-07 -2.14608e-06 -4.02308e-06 -6.55893e-06 -9.32316e-06 -1.12882e-05 -1.06662e-05 -4.8813e-06 9.23576e-06 3.49647e-05 7.49246e-05 0.0001301 0.000198849 0.000276163 0.000353477 0.000419285 0.000460675 0.000465695 0.000426183 0.00034048 0.000215308 6.61223e-05 -8.4517e-05 -0.00021059 -0.000287795 -0.000299266 -0.000240478 -0.000121944 3.13618e-05 0.00018425 0.000298726 0.000343093 0.000300629 0.000175456 -6.3234e-06 -0.00020118 -0.000357899 -0.000430542 -0.000391455 -0.000240772 -9.33714e-06 0.000246552 0.000458087 0.000561824 0.000518048 0.000324455 2.07424e-05 -0.000318216 -0.000599959 -0.000738927 -0.000681586 -0.00042503 -2.29937e-05 0.000423813 0.000791898 0.000968249 0.000883947 0.000538423 6.33489e-06 -0.000576688 -0.00104741 -0.00125965 -0.0011283 -0.000659873 4.08483e-05 0.000792039 0.00138063 0.00162149 0.0014139 0.000778594 -0.000137322 -0.00109203 -0.00181116 -0.00206512 -0.0017401 -0.000881521 0.000305512 0.00150241 0.00236065 0.00260134 0.0021028 0.000949518 -0.000575279 -0.00205605 -0.00305578 -0.00324243 -0.00249505 -0.000956713 0.000985808 0.00279555 0.00393079 0.00400373 0.002907 0.00086809 -0.00159018 -0.0037792 -0.00503334 -0.00490747 -0.00332582 -0.000634579 0.0024651 0.00509379 0.00643738 0.00599175 0.00373693 0.000183872 -0.00373032 -0.00688094 -0.00826953 -0.00732802 -0.00412354 0.000604051 0.00559764 0.00940314 0.0107765 0.00906772 0.00446908 -0.00195677 -0.00849721 -0.0132197 -0.0145092 -0.0115716 -0.00475745 0.00440338 0.0134948 0.0197903 0.0209845 0.0158991 0.00497459 -0.00960302 -0.0242101 -0.0344905 -0.0363181 -0.0268043 -0.00510957 0.0271481 0.0660075 0.105808 0.140236 0.163569 0.171822/ns0:coefficients /ns0:responseFIR ns0:coefficients-4.624365e-06 -8.258298e-05 -0.0002260141 -0.0002539009 7.665667e-07 0.0003050186 0.0001712792 -0.0003494469 -0.0004491013 0.0002631577 0.0007897725 3.857301e-05 -0.001091783 -0.0005999956 0.001206435 0.001397154 -0.0009624677 -0.002313273 0.0002078273 0.003130074 0.001137016 -0.003543348 -0.003024242 0.003207636 0.005238007 -0.001803839 -0.007375909 -0.0008729728 0.00887091 0.004831847 -0.009042305 -0.009813905 0.007179136 0.015253 -0.002628732 -0.02026759 -0.005142914 0.02366362 0.01657857 -0.02387548 -0.03227953 0.01860678 0.05394208 -0.003140518 -0.08849621 -0.04014856 0.1847636 0.4066011/ns0:coefficients /ns0:responseFIR ns0:zeros(0.0,0.0) (0.0,0.0)/ns0:zeros ns0:poles(-0.037004,0.037016) (-0.037004,-0.037016) (-251.33,0.0) (-131.04,-467.29) (-131.04,467.29)/ns0:poles /ns0:responsePAZ /ns0:inventory PURGE 238958

    BYE

    XMLSyntaxError Traceback (most recent call last)

    /home/megies/ in ()

    /home/megies/obspy/obspy.arclink/trunk/obspy/arclink/client.pyc in getPAZ(self, network_id, station_id, location_id, channel_id, start_datetime, end_datetime) 501 xml_doc = self._fetch(rtype, [rdata]) 502 # generate object by using XML schema --> 503 xml_doc = objectify.fromstring(xml_doc, self.inventory_parser) 504 if not xml_doc.countchildren(): 505 return {}

    /usr/lib/python2.5/site-packages/lxml/objectify.so in lxml.objectify.fromstring (src/lxml/lxml.objectify.c:16186)()

    /usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree.fromstring (src/lxml/lxml.etree.c:21907)()

    /usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:60613)()

    /usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._parseDoc (src/lxml/lxml.etree.c:59530)()

    /usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:56815)()

    /usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:53512)()

    /usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:54372)()

    /usr/lib/python2.5/site-packages/lxml/etree.so in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:53770)()

    XMLSyntaxError: Element '{http://geofon.gfz-potsdam.de/ns/Inventory/1.0/}inventory': No matching global declaration available for the validation root. }}}

    评论

报告相同问题?