QuakeML incomplet quand on utilise un eventtype non valide
Si on utilise un eventtype
non valide, le QuakeML retourné est tronqué à la fin.
Exemple (avec eventtype=xxx
):
$ curl https://namazu-search.u-strasbg.fr/fdsnws/event/1/query\?eventtype\=xxx\&orderby\=time\&starttime\=2021-01-24T00:0
0:00
<?xml version="1.0" encoding="UTF-8"?><q:quakeml xmlns:q="http://quakeml.org/xmlns/quakeml/1.2"
xmlns="http://quakeml.org/xmlns/bed/1.2" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xsi:schemaLocation="http://quakeml.org/schema/xsd http://quakeml.org/schema/xsd/QuakeML-1.2.xsd"
<eventParameters publicID="smi:https://namazu-test.u-strasbg.fr/fdsnws/event/1/query
eventtype=xxx&orderby=time&starttime=2021-01-24T00%3A00%3A00">
Ils manquent les tags </eventParameters></q:quakeml>
.
Cela embête certains clients, comme ObsPy:
from obspy import UTCDateTime
from obspy.clients.fdsn import Client
cl = Client('https://namazu-search.u-strasbg.fr')
t0 = UTCDateTime('20210124')
cl.get_events(starttime=t0, eventtype='xxx')
ValueError: Could not parse '<_io.BytesIO object at 0x7fe6920114d0>' to an etree element.