-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Recently ran into an error when running the following code for site 02469675 (it isn't currently maintained):
import dataretrieval
test = dataretrieval.nwis.get_stats(sites='02469675')
.....
fields = re.split('[\t]', rdb.splitlines()[count]) # points to this as being the issue
fields = [field.replace(',', '') for field in fields]
dtypes = {
'site_no': str,
'dec_long_va': float,
(...)
'parameter_cd': str,
}
IndexError: list index out of range
This is because the link (https://waterservices.usgs.gov/nwis/stat/?sites=02469675) returns the following:
# //Output-Format: RDB
# //Response-Status: OK
# //Response-Message: No sites found matching all criteria
I think we should accommodate these potential responses.
Metadata
Metadata
Assignees
Labels
No labels