Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Connectction times out #40

Open
slowtoaccept opened this issue Aug 2, 2020 · 1 comment
Open

Connectction times out #40

slowtoaccept opened this issue Aug 2, 2020 · 1 comment

Comments

@slowtoaccept
Copy link

Attempted to connect from simple example:

from pprint import pprint
import noaa_coops as nc
seattle = nc.Station(9447130)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='tidesandcurrents.noaa.gov', port=80): Max retries exceeded with url: /mdapi/v1.0/webapi/stations/9447130.json?expand=details,sensors,products,disclaimers,notices,datums,harcon,tidepredoffets,benchmarks,nearby,bins,deployments,currentpredictionoffsets,floodlevels?units=metric (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000212435D1BB0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

from pprint import pprint >>> import noaa_coops as nc >>> seattle = nc.Station(9447130)>>> from pprint import pprint >>> import noaa_coops as nc >>> seattle = nc.Station(9447130)

Same error with two other local station ids.

@bkposton
Copy link

bkposton commented Aug 5, 2020

It looks like the mdapi as documented on the noaa site and as used by this project is not currently responding (ex. http://tidesandcurrents.noaa.gov/mdapi/v1.0/webapi/stations/9414290.json). I just emailed them to ask if this is an outage or a permanent change to other apis which do respond such as https://api.tidesandcurrents.noaa.gov/mdapi/prod/webapi/stations/9414290.json.

changing metadata_base_url to seems to work as is right now and allow requests if they don't respond or if it is a permanent change from their end.
metadata_base_url = ('https://api.tidesandcurrents.noaa.gov/mdapi/prod/webapi/stations/')

bkposton added a commit to bkposton/noaa_coops that referenced this issue Aug 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants