Broken CMR query for downloading GEDI L4A data
Posted: Sun Mar 20, 2022 2:00 pm America/New_York
Hi,
I am getting the following error while running the very first few lines of this github tutorial:
https://github.com/ornldaac/gedi_tutorials/blob/main/1_gedi_l4a_search_download.ipynb
The code was working correctly only a few days/weeks ago.
[code]
In [1]: import requests
...:
...: doi = '10.3334/ORNLDAAC/1986'# GEDI L4A DOI
...:
...: # CMR API base url
...: cmrurl='https://cmr.earthdata.nasa.gov/search/'
...:
...: doisearch = cmrurl + 'collections.json?doi=' + doi
...: concept_id = requests.get(doisearch).json()['feed']['entry'][0]['id']
...: print(concept_id)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-1-62b778a2de5e> in <module>
7
8 doisearch = cmrurl + 'collections.json?doi=' + doi
----> 9 concept_id = requests.get(doisearch).json()['feed']['entry'][0]['id']
10 print(concept_id)
IndexError: list index out of range
[/code]
I am getting the following error while running the very first few lines of this github tutorial:
https://github.com/ornldaac/gedi_tutorials/blob/main/1_gedi_l4a_search_download.ipynb
The code was working correctly only a few days/weeks ago.
[code]
In [1]: import requests
...:
...: doi = '10.3334/ORNLDAAC/1986'# GEDI L4A DOI
...:
...: # CMR API base url
...: cmrurl='https://cmr.earthdata.nasa.gov/search/'
...:
...: doisearch = cmrurl + 'collections.json?doi=' + doi
...: concept_id = requests.get(doisearch).json()['feed']['entry'][0]['id']
...: print(concept_id)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-1-62b778a2de5e> in <module>
7
8 doisearch = cmrurl + 'collections.json?doi=' + doi
----> 9 concept_id = requests.get(doisearch).json()['feed']['entry'][0]['id']
10 print(concept_id)
IndexError: list index out of range
[/code]