[webservices] null returns from fdsnws-station service [SEC=UNCLASSIFIED]

Matthew.Hoyles at ga.gov.au Matthew.Hoyles at ga.gov.au
Thu Sep 11 20:38:14 PDT 2014


Hello

Thank you for the quick response with useful information. We are querying from a program, I was just using a browser to test and see what was going wrong. I will modify the code to check for status code 204 and treat it as a special case.

I will explain what was happening in a bit more detail, in case anyone is interested. The program (written in Python) was doing three steps: first query the station service for the station and channel metadata as XML, second parse the metadata and extract a list of channels, third request waveform data from the dataselect service (for the intersection of a list of channels of interest and the list of available channels from the metadata). The first step was apparently succeeding (204 is a success code, so the url library was not throwing an exception, as it does for 404, for example). Then an empty string was passed to the second step, causing the XML parser to throw an exception, which was reported as an error in the log files and a failed data request, rather than a no data result. In this scenario the third step, which would have interpreted an empty channel list as 'no data', was never reached.

Thanks again for the help.

Matthew


Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks.
-------------------------------------------------------------------------------------------------------------------------




More information about the webservices mailing list