Error running the lsDownload function
I am using the lsSearch and lsDownload function for some weeks now to obtain the landsat images from several seasons and years. It was working fine (mostly) but now I get an error I can't figure out:
#search images with cloud cover less than 30% PB2014 <- lsSearch(product = "LANDSAT_8_C1", startDate = as.Date("15-07-2014", "%d-%m-%Y"), endDate = as.Date("15-09-2014", "%d-%m-%Y"), cloudCover = c(0,30), username = "username", password = "password", extent = postbreeding) #area, may be raster or poligon
#download the data lsDownload(searchres = PB2014, #with the test layer username = "username", password = "password", untar = FALSE, raw.rm = FALSE, AppRoot = wdir_pb14, nattempts = 5)
Downloading the images in: /home/ritaramos/Desktop/NDVI/postbreebing2014/Landsat8/raw Starting Landsat level 1 download process... Error in charToRaw(enc2utf8(val)) : argument must be a character vector of length 1
was there a change in the package recently that requires a change in the script?
All the best,
I am getting the same error, but only for lvl=1 products. After poking around a bit, it seems like the error might be occurring in the 'startUSGSsession()" function in 'lsStartSession.R' I'm not too familiar with requests and html, but the "csrf" (Line 17 of lsStartSession.R) variable seems to have no value. Perhaps the login webpage format has changed? Changing 'csrf_token' to 'csrf' provides a value, but then I get a 404 Error.
Getting the same error running the example from the docs