Closed jessicamillar closed 2 years ago
Well, just to eliminate the obvious things first... are you passing that request in verbatim? Or are you replacing "{NREL_API_KEY}" and "{lon},{lat}" with an actual API key, longitude, and latitude?
Hi Paul -
Thanks for the swift help. I did notice a typo in my query (attributers instead of attributes) but that didn't seem to be the issue.
import requests query_string = 'https://developer.nrel.gov/api/nsrdb/v2/solar/psm3-tmy-download.csv?api_key=jH2MBoOI7XvLel05JgYOujNjw9hJxmZ6jnMvXuQ9&names=tmy&utc=true&email=jessica.lynn.millar@gmail.com&attributes=dni&wkt=POINT(-68.7,45.65)' response = requests.get(query_string) response.json()['errors']
results in: ['Data processing failure.']
If there is a different nsrdb api endpoint I could use for dni that would be fine.
Ahh, just a WKT format issue. Looks like our validation code didn't catch this one. Simply remove the comma between the lat and lon e.g.
https://developer.nrel.gov/api/nsrdb/v2/solar/psm3-tmy-download.csv?api_key=<blahblahblah>names=tmy&utc=true&email=jessica.lynn.millar@gmail.com&attributes=dni&wkt=POINT(-68.7 45.65)
Thanks Paul!
You're welcome!
Hi. I am trying to get typical modeled year direct normal irradiance data and am working with the nsrdb api for the first time. I am getting a 'Data processing failure' error. Am I making an error in the request, is there a different/better way to request, or shall I sit tight for issues to be resolved?
query_string = f'https://developer.nrel.gov/api/nsrdb/v2/solar/psm3-tmy-download.csv?api_key={NREL_API_KEY}&names=tmy&utc=true&email={email}&attributers=dni&wkt=POINT({lon},{lat})' response = requests.get(query_string) response.json()['errors']
result: ['Data processing failure.']