On Thu, Aug 22, 2013 at 12:23 PM, Tal Galili <tal.gal...@gmail.com> wrote: > 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)
It's a common mistake, cf. https://stat.ethz.ch/pipermail/r-devel/2012-August/064739.html. Also one of the reasons for why R.utils::downloadFile() exists. > 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). I also get this message (on R devel on Windows). It's seems to be part of the HTTP header and nothing that R generates. Using wget --save-headers <url> (outside of R) you get: HTTP/1.0 200 OK Content-Length: 5799936 Content-Type: Composite Document File V2 Document, corrupt: Can't read SAT; charset=binary Content-Disposition: attachment; filename="pandoc-1.11.1.msi" Accept-Ranges: bytes Date: Thu, 22 Aug 2013 20:14:08 GMT Last-Modified: Sun, 17 Mar 2013 22:27:41 GMT Expires: Thu, 29 Aug 2013 20:14:08 GMT Cache-Control: public, max-age=604800 Server: DFE/largefile Alternate-Protocol: 80:quic Connection: keep-alive /Henrik > > 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.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 <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<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. >>>> >>>> >> > > [[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.