#93 FDSN dataselect error with addtional parameters for SCEDC

Closed
opened 3 months ago by asteinbe · 2 comments

An FDSN dataselect question: the parameters minimumlength and longestonlyare always appended in fdsn.py dataselect- however at least for SCEDC dataselect requests this result in an error (see below). easy to hot fix with a if conditional for site == “scedc” before the named parameters are appended in l310-315.
maybe there is a better and general way to fix this? or does this only occur at SCEDC? i could not reproduce the error with other known sites.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/pyrocko/client/fdsn.py", line 141, in _request
    resp = urlopen_(req, **url_args)
  File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: 400

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test_scedc.py", line 31, in <module>
    request_waveform = fdsn.dataselect(site='http://service.scedc.caltech.edu', selection=selection)
  File "/usr/local/lib/python3.6/dist-packages/pyrocko/client/fdsn.py", line 337, in dataselect
    timeout=params.get('timeout', g_timeout)))
  File "/usr/local/lib/python3.6/dist-packages/pyrocko/client/fdsn.py", line 182, in _request
    raise DownloadError('Original error was: %s' % str(e))
pyrocko.util.DownloadError: Original error was: HTTP Error 400: 400
An FDSN dataselect question: the parameters `minimumlength` and `longestonly`are always appended in fdsn.py dataselect- however at least for SCEDC dataselect requests this result in an error (see below). easy to hot fix with a if conditional for site == "scedc" before the named parameters are appended in l310-315. maybe there is a better and general way to fix this? or does this only occur at SCEDC? i could not reproduce the error with other known sites. ``` Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/pyrocko/client/fdsn.py", line 141, in _request resp = urlopen_(req, **url_args) File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(*args) File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: 400 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test_scedc.py", line 31, in <module> request_waveform = fdsn.dataselect(site='http://service.scedc.caltech.edu', selection=selection) File "/usr/local/lib/python3.6/dist-packages/pyrocko/client/fdsn.py", line 337, in dataselect timeout=params.get('timeout', g_timeout))) File "/usr/local/lib/python3.6/dist-packages/pyrocko/client/fdsn.py", line 182, in _request raise DownloadError('Original error was: %s' % str(e)) pyrocko.util.DownloadError: Original error was: HTTP Error 400: 400 ```
emolch commented 3 months ago
Owner

Must be a relic from the very early testing of the fdsn module. Can be safely removed.

However, it might be good to add a way to check the web services for certain features. Here is a start: #94

Must be a relic from the very early testing of the fdsn module. Can be safely removed. However, it might be good to add a way to check the web services for certain features. Here is a start: https://git.pyrocko.org/pyrocko/pyrocko/pulls/94
emolch commented 3 months ago
Owner

Completed and part of v2020.08.18.

Completed and part of v2020.08.18.
emolch closed this issue 3 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.