landsatxplore icon indicating copy to clipboard operation
landsatxplore copied to clipboard

Error When Downloading: Unable to find product configuration

Open ghost opened this issue 1 year ago • 2 comments

2023-03-01 11_09_08-IDRISI API - Jupyter Notebook — Mozilla Firefox Hello,

I am trying to download a Landsat image using the following code workspace = "C:/Users/Documents/Notebooks/Testing/" ee = EarthExplorer(username, password) ee.download('LT51960471995178MPS00', output_dir=workspace)

I had to modify the EarthExplorer.py and remove the variable "ncform" to get the authentication to work correctly. However now I am receiving the following error when I go to run the code above.. "Unable to find product configuration"

Does anybody know what could be wrong here?

ghost avatar Mar 01 '23 16:03 ghost

Sam issue . I did the modifications in EarthExplorer.py as above and now I am getting this error

soumyadiptapete avatar Mar 08 '23 08:03 soumyadiptapete

I have modified this function get_tokens in earthexplorer.py the new function : def _get_tokens(body): """Get csrf_token and __ncforminfo.""" csrf = re.findall(r'name="csrf" value="(.+?)"', body)[0] # ncform = re.findall(r'name="__ncforminfo" value="(.+?)"', body)[0]

if not csrf:
    raise EarthExplorerError("EE: login failed (csrf token not found).")
# if not ncform:
#     raise EarthExplorerError("EE: login failed (ncforminfo not found).")

ncform = None
return csrf, ncform

Now i get the same error : landsatxplore.errors.EarthExplorerError: Unable to find product configuration

fouzai avatar Mar 08 '23 11:03 fouzai