landsatxplore
landsatxplore copied to clipboard
Error When Downloading: Unable to find product configuration
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?
Sam issue . I did the modifications in EarthExplorer.py as above and now I am getting this error
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