Tal Galili
2013-Aug-21 20:35 UTC
[R] download.file error - corrupt: Can't read SAT; charset=binary'
Dear R-help mailing list memebers, I encountered the following error, and I'd be happy for ideas on how to fix it: # using R 3.0.1 on Windows 7: exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename <- file.path(tempdir(), file.name.from.url(exe_URL)) download.file(exe_URL, destfile = exe_filename, mode = "w", method"internal") ### output error : trying URL 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' Content type 'Composite Document File V2 Document, corrupt: Can't read SAT; charset=binary' length 5799936 bytes (5.5 Mb) opened URL downloaded 5.5 Mb ### another error: And then when I try to execute the file (it is a windows installer), I get the error: "This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows installer package." Downloading the file manually and running it does work. Any suggestions? Thanks. ----------------Contact Details:------------------------------------------------------- Contact me: Tal.Galili@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---------------------------------------------------------------------------------------------- [[alternative HTML version deleted]]
Uwe Ligges
2013-Aug-21 20:45 UTC
[R] download.file error - corrupt: Can't read SAT; charset=binary'
On 21.08.2013 22:35, Tal Galili wrote:> Dear R-help mailing list memebers, > > I encountered the following error, and I'd be happy for ideas on how to fix > it: > > > # using R 3.0.1 on Windows 7: > exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' > exe_filename <- file.path(tempdir(), file.name.from.url(exe_URL)) > download.file(exe_URL, destfile = exe_filename, mode = "w", method> "internal") > > ### output error : > trying URL 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' > Content type 'Composite Document File V2 Document, corrupt: Can't read SAT; > charset=binary' length 5799936 bytes (5.5 Mb) > opened URL > downloaded 5.5 Mb > > ### another error: > And then when I try to execute the file (it is a windows installer), I get > the error: > "This installation package could not be opened. Contact the application > vendor to verify that this is a valid Windows installer package." > > Downloading the file manually and running it does work. > > > Any suggestions? >Use mode="wb", it is a binary file! Uwe Ligges> Thanks. > > > > > > ----------------Contact > Details:------------------------------------------------------- > Contact me: Tal.Galili at gmail.com | > Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | > www.r-statistics.com (English) > ---------------------------------------------------------------------------------------------- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >