Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'
Tal, please quote the whole message! I had to look for the original one now. And then I found that code was not reproducible for me: exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename - file.path(tempdir(), file.name.from.url(exe_URL)) Error in file.path(tempdir(), file.name.from.url(exe_URL)) : could not find function file.name.from.url and I do not know such a function. From its name I can guess basename(exe_URL) is the base function that does the trick. So please specify full and reproducible code that shows the error, including and does not contain any additional quirks like the mode=w Anyway, the installer works for me downloaded with the method I indicated before. Best, Uwe Ligges On 22.08.2013 07:23, Tal Galili wrote: Dear Uwe, My apologies - my original code had mode=wb, which also *does not* work and produce the errors I've mentioned in the previous e-mail. The code I pasted had mode =w, since that is one of the versions I've played with (which also does not work). With regards, Tal On Wed, Aug 21, 2013 at 11:45 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: Uwe Contact Details:--- Contact me: tal.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- [[alternative HTML version deleted]] __ R-help@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. __ R-help@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.
Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'
Dear Uwe, Here is the updated code and error massage I get: exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename - file.path(tempdir(), basename(exe_URL)) download.file(exe_URL, destfile = exe_filename, mode = wb, method= internal) # ### Error massage: 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 1) I am very sorry about the chipped previous massage (it is a side effect of some form of reply in gmail, which I have not noticed before). 2) I'm sorry about using the wrong function name - it comes with the installr package, since I have it running on startup, I was blind to see the code was not standard. Also, now that I know such a function exists in base R, I will move to using it. Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Thu, Aug 22, 2013 at 12:12 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: Tal, please quote the whole message! I had to look for the original one now. And then I found that code was not reproducible for me: exe_URL = 'http://pandoc.googlecode.com/**files/pandoc-1.11.1.msihttp://pandoc.googlecode.com/files/pandoc-1.11.1.msi ' exe_filename - file.path(tempdir(), file.name.from.url(exe_URL)) Error in file.path(tempdir(), file.name.from.url(exe_URL)) : could not find function file.name.from.url and I do not know such a function. From its name I can guess basename(exe_URL) is the base function that does the trick. So please specify full and reproducible code that shows the error, including and does not contain any additional quirks like the mode=w Anyway, the installer works for me downloaded with the method I indicated before. Best, Uwe Ligges On 22.08.2013 07:23, Tal Galili wrote: Dear Uwe, My apologies - my original code had mode=wb, which also *does not* work and produce the errors I've mentioned in the previous e-mail. The code I pasted had mode =w, since that is one of the versions I've played with (which also does not work). With regards, Tal On Wed, Aug 21, 2013 at 11:45 PM, Uwe Ligges lig...@statistik.tu-dortmund.**de lig...@statistik.tu-dortmund.de wrote: Uwe Contact Details:--**--**--- Contact me: tal.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) --**--** --** [[alternative HTML version deleted]] __** R-help@r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/** posting-guide.html http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@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.
Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'
Quick update - I think most of the problem is resolved. After more checks (following Uwe comments): 1) I see that the installer file runs properly when I set mode='wb', and fails when mode='w' (so that solves why some of the time the installer didn't run) 2) I still get the error massage mentioned before (e.g: Composite Document File V2 Document, corrupt: Can't read SAT, etc...). I don't know what it means, or if it is important (since the installer now runs properly). Tal Contact Details:--- Contact me: tal.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Thu, Aug 22, 2013 at 8:52 PM, Tal Galili tal.gal...@gmail.com wrote: Dear Uwe, Here is the updated code and error massage I get: exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename - file.path(tempdir(), basename(exe_URL)) download.file(exe_URL, destfile = exe_filename, mode = wb, method= internal) # ### Error massage: 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 1) I am very sorry about the chipped previous massage (it is a side effect of some form of reply in gmail, which I have not noticed before). 2) I'm sorry about using the wrong function name - it comes with the installr package, since I have it running on startup, I was blind to see the code was not standard. Also, now that I know such a function exists in base R, I will move to using it. Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Thu, Aug 22, 2013 at 12:12 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: Tal, please quote the whole message! I had to look for the original one now. And then I found that code was not reproducible for me: exe_URL = 'http://pandoc.googlecode.com/**files/pandoc-1.11.1.msihttp://pandoc.googlecode.com/files/pandoc-1.11.1.msi ' exe_filename - file.path(tempdir(), file.name.from.url(exe_URL)) Error in file.path(tempdir(), file.name.from.url(exe_URL)) : could not find function file.name.from.url and I do not know such a function. From its name I can guess basename(exe_URL) is the base function that does the trick. So please specify full and reproducible code that shows the error, including and does not contain any additional quirks like the mode=w Anyway, the installer works for me downloaded with the method I indicated before. Best, Uwe Ligges On 22.08.2013 07:23, Tal Galili wrote: Dear Uwe, My apologies - my original code had mode=wb, which also *does not* work and produce the errors I've mentioned in the previous e-mail. The code I pasted had mode =w, since that is one of the versions I've played with (which also does not work). With regards, Tal On Wed, Aug 21, 2013 at 11:45 PM, Uwe Ligges lig...@statistik.tu-dortmund.**de lig...@statistik.tu-dortmund.de wrote: Uwe Contact Details:--**--**--- Contact me: tal.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) --**--** --** [[alternative HTML version deleted]] __** R-help@r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/** posting-guide.html http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@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.
Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'
On 22.08.2013 19:52, Tal Galili wrote: Dear Uwe, Here is the updated code and error massage I get: exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename - file.path(tempdir(), basename(exe_URL)) download.file(exe_URL, destfile = exe_filename, mode = wb, method= internal) # ### Error massage: 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 I still don't see a problem when executing the installer, it is just a message that the content type cannot be read appropriately. Best, Uwe Ligges 1) I am very sorry about the chipped previous massage (it is a side effect of some form of reply in gmail, which I have not noticed before). 2) I'm sorry about using the wrong function name - it comes with the installr package, since I have it running on startup, I was blind to see the code was not standard. Also, now that I know such a function exists in base R, I will move to using it. Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com mailto:tal.gal...@gmail.com | Read me: www.talgalili.com http://www.talgalili.com (Hebrew) | www.biostatistics.co.il http://www.biostatistics.co.il (Hebrew) | www.r-statistics.com http://www.r-statistics.com (English) -- On Thu, Aug 22, 2013 at 12:12 PM, Uwe Ligges lig...@statistik.tu-dortmund.de mailto:lig...@statistik.tu-dortmund.de wrote: Tal, please quote the whole message! I had to look for the original one now. And then I found that code was not reproducible for me: exe_URL = 'http://pandoc.googlecode.com/__files/pandoc-1.11.1.msi http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename - file.path(tempdir(), file.name.from.url(exe_URL)) Error in file.path(tempdir(), file.name.from.url(exe_URL)) : could not find function file.name.from.url and I do not know such a function. From its name I can guess basename(exe_URL) is the base function that does the trick. So please specify full and reproducible code that shows the error, including and does not contain any additional quirks like the mode=w Anyway, the installer works for me downloaded with the method I indicated before. Best, Uwe Ligges On 22.08.2013 07:23, Tal Galili wrote: Dear Uwe, My apologies - my original code had mode=wb, which also *does not* work and produce the errors I've mentioned in the previous e-mail. The code I pasted had mode =w, since that is one of the versions I've played with (which also does not work). With regards, Tal On Wed, Aug 21, 2013 at 11:45 PM, Uwe Ligges lig...@statistik.tu-dortmund.__de mailto:lig...@statistik.tu-dortmund.de wrote: Uwe Contact Details:--__--__--- Contact me: tal.gal...@gmail.com mailto:tal.gal...@gmail.com | Read me: www.talgalili.com http://www.talgalili.com (Hebrew) | www.biostatistics.co.il http://www.biostatistics.co.il (Hebrew) | www.r-statistics.com http://www.r-statistics.com (English) --__--__--__ [[alternative HTML version deleted]] R-help@r-project.org mailto:R-help@r-project.org mailing list https://stat.ethz.ch/mailman/__listinfo/r-help https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/__posting-guide.html http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@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.
Re: [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.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- [[alternative HTML version deleted]] __ R-help@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. __ R-help@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.
Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'
Dear Uwe, My apologies - my original code had mode=wb, which also *does not* work and produce the errors I've mentioned in the previous e-mail. The code I pasted had mode =w, since that is one of the versions I've played with (which also does not work). With regards, Tal On Wed, Aug 21, 2013 at 11:45 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: Uwe Contact Details:--- Contact me: tal.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- [[alternative HTML version deleted]] __ R-help@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.