[R] download.file error - corrupt: Can't read SAT; charset=binary'

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed Aug 21 22:45:20 CEST 2013



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



More information about the R-help mailing list