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

Error in processLandsat - extraction from tar.gz #62

Closed
Bartesto opened this issue Nov 15, 2016 · 9 comments
Closed

Error in processLandsat - extraction from tar.gz #62

Bartesto opened this issue Nov 15, 2016 · 9 comments

Comments

@Bartesto
Copy link

Bartesto commented Nov 15, 2016

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
Copy link
Owner

loicdtx commented Nov 15, 2016

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

@Bartesto
Copy link
Author

Bartesto commented Nov 16, 2016

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
Copy link
Owner

loicdtx commented Nov 17, 2016

@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 ...

@loicdtx loicdtx closed this as completed Nov 17, 2016
@Bartesto
Copy link
Author

@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
Copy link
Owner

loicdtx commented Nov 18, 2016

@Bartesto just some random thoughts.

  • You'll get a more informative error message by running tar.exe -ztf H:/cdr_bulk/kimberley_cdr_imagery/LC81090702013114-SC20161103012226.tar.gz directly from the command line.
  • Does the command (processLandsat or untar) still work on the old data you mentioned that used to work? If yes, something has changed with the espa data, otherwise it's your system.

@Bartesto
Copy link
Author

@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
Copy link

@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
Copy link
Owner

loicdtx commented Mar 13, 2023

#95 (comment)

@jlmelville
Copy link

@antondewinter just for posterity's sake as a similar bug was just reported to my repo (jlmelville/uwot#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.

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

4 participants