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

install_github error "foo.zip cannot be opened" #82

Closed
cboettig opened this issue Apr 11, 2012 · 10 comments
Closed

install_github error "foo.zip cannot be opened" #82

cboettig opened this issue Apr 11, 2012 · 10 comments

Comments

@cboettig
Copy link

I get this error on several packages, but not all. Cloning the repo and running R CMD INSTALL works just fine. I've had a colleague who can reproduce this and another who can't -- so I'm not sure where to start debugging. Session info below.

install_github("RWordPress", "duncantl")
Installing github repo(s) RWordPress/master from duncantl
Installing RWordPress.zip from https://github.com/duncantl/RWordPress/zipball
Error in expand(src, list = TRUE) : 
  zip file '/tmp/Rtmpd7zQav/RWordPress.zip' cannot be opened
In addition: Warning message:
In expand(src, exdir = tempdir()) : error 1 in extracting from zip file

Enter a frame number, or 0 to exit   

1: install_github("RWordPress", "duncantl")
2: install_url(url, paste(repo, ".zip", sep = ""), ...)
3: mapply(install_url_single, url, name, ...)
4: function (url, name = NULL, ...) 
{
    if (is.null(name)) {
        name <- b
5: decompress(bundle)
6: file.path(target, outdir())
7: outdir()
8: basename(as.character(expand(src, list = TRUE)$Name[1]))
9: expand(src, list = TRUE)

system info:

> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=C                  LC_COLLATE=C              
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
[1] knitr_0.4.6  devtools_0.6

loaded via a namespace (and not attached):
 [1] RCurl_1.91-1    Rcpp_0.9.10     codetools_0.2-8 digest_0.5.2   
 [5] evaluate_0.4.2  formatR_0.4     highlight_0.3.1 parser_0.0-14  
 [9] plyr_1.7.1      stringr_0.6     tools_2.15.0   
> 
@hadley
Copy link
Member

hadley commented Apr 11, 2012

Hmmm, I suspect it's some corruption or failure to download of the zipfile. Can you try and get a copy of (e.g.) /tmp/Rtmpd7zQav/RWordPress.zip and see if it looks ok?

@cboettig
Copy link
Author

Good idea. It does look like it's corrupted.

Archive:  /home/cboettig/Desktop/RWordPress.zip
[/home/cboettig/Desktop/RWordPress.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
zipinfo:  cannot find zipfile directory in one of /home/cboettig/Desktop/RWordPress.zip or
          /home/cboettig/Desktop/RWordPress.zip.zip, and cannot find /home/cboettig/Desktop/RWordPress.zip.ZIP, period.

Any idea why this happens? the error is replicable for me.

@hadley
Copy link
Member

hadley commented Apr 11, 2012

How many bytes is the file?

@hadley
Copy link
Member

hadley commented Apr 11, 2012

And are you using a proxy?

@cboettig
Copy link
Author

10 bytes. not a good sign ;-)
Not using a proxy. Other packages work just fine, i.e.

install_github("Rflickr", "duncantl")

works without an issue.

On Wed, Apr 11, 2012 at 2:46 PM, hadley wickham <
reply@reply.github.com

wrote:

And are you using a proxy?


Reply to this email directly or view it on GitHub:
#82 (comment)

Carl Boettiger
UC Davis
http://www.carlboettiger.info/

@hadley
Copy link
Member

hadley commented Apr 11, 2012

Hmmm - maybe because https://github.com/duncantl/RWordPress/zipball gives a 404? And https://github.com/duncantl/RWordPress says "nothing to see here"

@cboettig
Copy link
Author

whoops. I could swear I got the same error from ROAuth, which actually
does exist, in which I was able to download and install the repo. But now
install_github is working for that. Must have somehow called
install_github while the zip file was unavailable(?)
Anyway, mystery solved, sorry for the trouble!

On Wed, Apr 11, 2012 at 2:52 PM, hadley wickham <
reply@reply.github.com

wrote:

Hmmm - maybe because https://github.com/duncantl/RWordPress/zipball gives
a 404? And https://github.com/duncantl/RWordPress says "nothing to see
here"


Reply to this email directly or view it on GitHub:
#82 (comment)

Carl Boettiger
UC Davis
http://www.carlboettiger.info/

@karthik
Copy link
Contributor

karthik commented Apr 11, 2012

In the case of ROAuth, I can report the same issue that Carl had. install_github works intermittently on some repos. It works sometimes without any error but fails at other times despite the lack of any updates to the repo itself. Just tried it again in dev_mode() and it works fine.

@hadley
Copy link
Member

hadley commented Apr 12, 2012

Once I get httr on CRAN, I can use it, and then it should be possible to give more informative errors in case of http problems - I suspect that's what's happening here.

@cboettig
Copy link
Author

Thanks for fixing this. Might you mention the fix on the original SO question so I can accept it as the correct answer?

@lock lock bot locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants