You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
NREL's TMY file server recently started rejecting requests originating from urlopen. The response was:
"<html><head><title>Request Rejected</title></head><body>An error has occurred. Please consult with your administrator.<br><br>Your support ID is: 12437308730316847769<br><br><a href='javascript:history.back();'>[Go Back]</a></body></html>"
However, it's still possible to download a file from the same url with a web browser. Mostly likely they, intentionally or not, started blocking any requests that don't come with a browser-like HTTP User-Agent header.
I have a fix mostly ready to go.
To Reproduce
pvlib/test/test_tmy.pyF>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>traceback>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>@networkdeftest_readtmy3_remote():
url='http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/703165TYA.CSV'>tmy.readtmy3(url)
pvlib/test/test_tmy.py:19:
# read in file metadatameta=dict(zip(head, csvdata.readline().rstrip('\n').split(",")))
# convert metadata strings to numeric types>meta['altitude'] =float(meta['altitude'])
EKeyError: 'altitude'pvlib/tmy.py:178: KeyError
@wholmgren and @cwhanse unfortunately it looks like NREL has permanently retired the old rredc websites, however I think you can download a single CSV from MTS2:
Activity
specify user-agent in tmy3 remote request (#494)
mikofski commentedon Jul 26, 2018
@wholmgren and @cwhanse unfortunately it looks like NREL has permanently retired the old rredc websites, however I think you can download a single CSV from MTS2:
what a PITA
cwhanse commentedon Jul 26, 2018
Agree with the comment about the NREL site limitations. The PSM NSRDB files have the same restrictions.
At what point does maintenance of this connection to the NSRDB become too much work?
adriesse commentedon Jul 26, 2018
Maybe if someone asked, they would keep it alive?
wholmgren commentedon Jul 26, 2018
I think the answer is "now". I suggest we remove the feature.
cwhanse commentedon Jul 26, 2018
I agree - we should remove the capability to pass a url to read_tmy3.
It was nice capability while it worked.
wholmgren commentedon Jul 27, 2018
NREL's TMY server is back online and the downloads are working again.