Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NCDEC fdsn goes HTTPS #3201

Closed
1 task done
ThomasLecocq opened this issue Nov 3, 2022 · 0 comments · Fixed by #3203
Closed
1 task done

NCDEC fdsn goes HTTPS #3201

ThomasLecocq opened this issue Nov 3, 2022 · 0 comments · Fixed by #3203
Labels
bug-unconfirmed reported bug that still needs to be confirmed
Milestone

Comments

@ThomasLecocq
Copy link
Contributor

ThomasLecocq commented Nov 3, 2022

Avoid duplicates

  • I searched existing issues

Bug Summary

Received by email:

We (NCEDC) recently started using https (from http) for FDSN webservice and this would make an error when obspy users will use Client("NCEDC") as shown at the bottom of the email. A simple tentative solution to work around this issue is to overwrite URL_MAPPINGS:

from obspy.clients.fdsn.header import URL_MAPPINGS
URL_MAPPINGS['NCEDC'] = "https://service.ncedc.org/"

We will post this at the front page of the NCEDC website so that users can get our data with obspy but eventually it would be great if obspy source code will use "https://service.ncedc.org/". Could you please pass this information to the obspy developer team?

Thank you so much again for providing obspy (and MSNoise indeed!) to the community. Please let me know if you have questions.

Code to Reproduce

from obspy.clients.fdsn import Client
client1 = Client("NCEDC") # data from NCEDC

Error Traceback

client1 = Client("NCEDC") # data from NCEDC
---------------------------------------------------------------------------
FDSNException                             Traceback (most recent call last)
<ipython-input-113-75b7c9c20b1d> in <module>
      1 from obspy.clients.fdsn import Client
----> 2 client1 = Client("NCEDC") # data from NCEDC

~/opt/anaconda3/envs/netops/lib/python3.8/site-packages/obspy/clients/fdsn/client.py in __init__(self, base_url, major_versions, user, password, user_agent, debug, timeout, service_mappings, force_redirect, eida_token, _discover_services)
    261
    262         if _discover_services:
--> 263             self._discover_services()
    264         else:
    265             self.services = DEFAULT_SERVICES

~/opt/anaconda3/envs/netops/lib/python3.8/site-packages/obspy/clients/fdsn/client.py in _discover_services(self)
   1737                    "be due to a temporary service outage or an invalid FDSN "
   1738                    "service address." % self.base_url)
-> 1739             raise FDSNException(msg)
   1740
   1741         # Cache.

FDSNException: No FDSN services could be discovered at 'http://service.ncedc.org'. This could be due to a temporary service outage or an invalid FDSN service address.

ObsPy Version?

all

Operating System?

all

Python Version?

all

Installation Method?

No response

@ThomasLecocq ThomasLecocq added the bug-unconfirmed reported bug that still needs to be confirmed label Nov 3, 2022
@ThomasLecocq ThomasLecocq changed the title NCDEC fdsn goes HTTPs NCDEC fdsn goes HTTPS Nov 3, 2022
@megies megies added this to the 1.4.0 milestone Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-unconfirmed reported bug that still needs to be confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants