DOI-USGS / dataretrieval-python

Python package for retrieving water data from USGS or the multi-agency Water Quality Portal
https://doi-usgs.github.io/dataretrieval-python/
Other
156 stars 37 forks source link

GW levels fails #154

Closed jnmitchell-USGS closed 2 weeks ago

jnmitchell-USGS commented 2 weeks ago

The "get_gwlevels" function of the dataretrieval package is returning empty dataframes and a HTML error message indicating "HTTP Status 503 - Service unavailable please try again later or contact gs-w_support_nwisweb@usgs.gov." As such, I sent an email to gs-w_support_nwisweb@usgs.gov but wanted to post here as well, in case there was an issue specific to the NWIS data-retrieval package. For what it is worth, I received this error for sites in WA (my location) and for sites in other states, and also received this error for both old and newly created sites.

import dataretrieval.nwis as nwis

temp_site_list = [464038120271601,
                464038120273501,
                464017120282501,
                464034120281001,
                464057120262601]

nwis.get_gwlevels(sites=temp_site_list, datetime_index=False, parameterCd='62611',
                 start='2023-01-01', end='2024-08-30')[0]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Error report</title><style type="text/css"><!--H1 {font-family:TahomaArialsans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:TahomaArialsans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:TahomaArialsans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:TahomaArialsans-serif;color:black;background-color:white;} B {font-family:TahomaArialsans-serif;color:white;background-color:#525D76;} P {font-family:TahomaArialsans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 503 - Service unavailable please try again later or contact gs-w_support_nwisweb@usgs.gov. server=[caas01]</h1><hr/><p><b>type</b> Status report</p><p><b>message</b>Service unavailable please try again later or contact gs-w_support_nwisweb@usgs.gov. server=[caas01]</p><p><b>description</b>The requested service is not currently available.</p><hr/><h3>Error Report</h3></body></html>

lstanish-usgs commented 2 weeks ago

Thanks for reporting the error. Can you provide the version of dataretrieval you are using?

jnmitchell-USGS commented 2 weeks ago

Well, I should have thought of that one!

Updated to 1.0.10 and the library/functions are running smoothly now. Thanks for the prompt!

thodson-usgs commented 2 weeks ago

Good. The old service was going online, so @ehinman updated the endpoint URL in #147