cdse credentials saved and retrieved from different file paths.
saved credentials using save_creds = TRUE
are not subsequently located by the function when running without credentials supplied.
boa_files <- acquire_scihub(aoi,
from_date, to_date,
veg_index = "SAVI",
output_dir = tempdir(),
# For the first run, uncomment below, and supply credentials...
save_creds = TRUE,
clientid = "xxxxx",
secret = "-----",
SWIR_band = 11)
Credentials are saved to: xxxxxx/Library/Preferences/CDSE/cdse_credentials.json
Running again without the save_cred=TRUE
(eg. boa_files <- acquire_scihub(aoi)
) returns an error suggesting it's looking in the wrong spot for credentials.
No CDSE credentials found. Exiting...
No CDSE token found. Exiting...
Warning message:
In retrieve_cdse_credentials() :
No credentials file: xxxxxx/Library/Preferences/.CDSE/cdse_credentials.json found. Credentials are not available.
Edited by Harry Eslick