loicdtx / bfastSpatial

Set of utilities and wrappers to perform change detection on satellite image time-series (Landsat and MODIS). Includes pre-processing steps and functions for spatial implementation of bfastmonitor change detection and post processing of the results.
93 stars 39 forks source link

Error in processLandsat - extraction from tar.gz #62

Closed Bartesto closed 7 years ago

Bartesto commented 7 years ago

Hi, Have run your package previously and did not have this problem however I get this error when running processLandsat on newly downloaded data from ESPA:

"Error in processLandsat(x = list[1], vi = "ndvi", outdir = dirout, srdir = srdir, : Did not find any .tif or .hdf files in the archive In addition: Warning message: running command 'tar.exe -ztf "H:/cdr_bulk/kimberley_cdr_imagery/LC81090702013114-SC20161103012226.tar.gz"' had status 2"

The error seems to stem from the line tarlist <- untar(x, list=TRUE)

I am running windows, R version 3.3.1, RStudio 0.99.903 and bfastSpatial 0.6.3.

The download from ESPA contains the ...cf_mask.tif and the ...sr_ndvi.tif

Thanks Bart

loicdtx commented 7 years ago

Hi @Bartesto What happens if you run untar("H:/cdr_bulk/kimberley_cdr_imagery/LC81090702013114-SC20161103012226.tar.gz", list = TRUE) ?

Bartesto commented 7 years ago

Hi @loicdtx Still no luck. I get the following: [1] "tar (child): Cannot connect to H: resolve failed"
[2] ""
[3] "gzip: stdin: unexpected end of file"
[4] "/usr/bin/tar: Child returned status 128"
[5] "/usr/bin/tar: Error is not recoverable: exiting now" attr(,"status") [1] 2 Warning message: running command 'tar.exe -ztf "H:/cdr_bulk/kimberley_cdr_imagery/LC81090702013114-SC20161103012226.tar.gz"' had status 2

I started to think that perhaps my downloads shouldn't be on an external drive (H:) so I moved them locally but got the same error messages.

I have tried it on other people's computers and it works no problems so it seems it is something to do with my computer/environment. From the errors it looks like it might be trying a linux type filepath? I have checked that the filepath to the tar.exe on my machine has been set correctly in settings and it is.

Any ideas? Thanks for your help.

loicdtx commented 7 years ago

@Bartesto it indeed looks like something is not right with your system. I wouldn't know what to look for to fix that issue though ...

Bartesto commented 7 years ago

@loicdtx Thanks.

I'll keep poking around. I'm trying to convince another Department to incorporate this package in their workflow and my fear is that they might strike this. Will report back if I find something that could help others.

loicdtx commented 7 years ago

@Bartesto just some random thoughts.

Bartesto commented 7 years ago

@loicdtx Thnx for the random thoughts.

I have been tasked to another project this week (creating some shiny apps) so haven't had a chance to dig further here. I have however located the old data so will hopefully start investigating again next week.

Thanks again for your help and i will let you know if I find something useful.

antondewinter commented 1 year ago

@Bartesto Did you find a solution for your troubles? I am currently running into the same problem and I was wondering if you eventually did find the solution.

loicdtx commented 1 year ago

https://github.com/loicdtx/bfastSpatial/issues/95#issuecomment-1427880860

jlmelville commented 1 year ago

@antondewinter just for posterity's sake as a similar bug was just reported to my repo (https://github.com/jlmelville/uwot/issues/109), the error message is because tar interprets the colon in the drive letter as if you are trying to connect to a remote computer, rather than a Windows drive -- are you using Windows 7? See the help text in ?utils::tar for more details but adding extra=c("--force-local") to the untar command might work.