Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_site_MODIS doesn't seem to use credentials from setenv #98

Open
jeancaffou opened this issue Feb 9, 2023 · 0 comments
Open

get_site_MODIS doesn't seem to use credentials from setenv #98

jeancaffou opened this issue Feb 9, 2023 · 0 comments

Comments

@jeancaffou
Copy link

Tried to set credentials:

Sys.setenv(earthdata_user = 'jeancaffou',
           earthdata_pass = ',,,')

They seem to be set correctly

> Sys.getenv("earthdata_user")
[1] "jeancaffou"

But when fetching data, I get 401 unauthorized, wrong pass, even though the same credentials work for the login on the website of usgs

> site_modis_lst <- get_site_MODIS(
+   site_id, product = "LST",
+   from_date = "2022.10.01", to_date = "2023.01.30",
+   output_dir = output_dir,
+   output_proj = crs_fr,
+   plot_ts = TRUE)
Acquiring: LST_3band_emissivity_8day_1km (M*D21A2)
2023-02-09 12:00:10 - Download starting.
Request failed [401]. Retrying in 1 seconds...
Request failed [401]. Retrying in 1 seconds...
Request failed [401]. Retrying in 1 seconds...
Request failed [401]. Retrying in 1 seconds...
Error in MODIStsp_download(modislist, proc_opts$out_folder_mod, download_server,  : 
  Username and/or password are not valid. Please provide
             valid ones!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant