HDFGroup / h5pyd

h5py distributed - Python client library for HDF Rest API
Other
115 stars 38 forks source link

Error retrieving data: 429 #115

Closed gummadiharsha closed 2 years ago

gummadiharsha commented 2 years ago

I am trying to fetch data from temperature_2m dataset using below code

f = h5pyd.File("/nrel/wtk-us.h5", 'r') tp_2 = f['temperature_2m'] tp_2[14600:15057,39.950794,-120.808014]

This is the issue I am facing. could you please help me resolve this issue

857 break 858 else: --> 859 raise IOError("Error retrieving data: {}".format(ioe.errno)) 860 if type(rsp) is bytes: 861 # got binary response

OSError: Error retrieving data: 429

jreadey commented 2 years ago

Are you using https://developer.nrel.gov/api/hsds as the HSDS endpoint? This gateway will impose a limit on the number of requests you can send in a given time.

gummadiharsha commented 2 years ago

Thank you for a prompt response @jreadey. It helped

jreadey commented 2 years ago

FYI - if it's more convenient you can use HDF Lab to access the NREL data. See: https://www.hdfgroup.org/hdfkitalab/. HDF Lab runs in the same AWS region as the NREL bucket, so retrieving the data should be fairly fast. An example can be found here: https://github.com/HDFGroup/hdflab_examples/blob/master/NREL/nrel_example.ipynb. When you log into HDF Lab, you'll find this notebook in the examples/NREL directory.