On Fri, Apr 12, 2013 at 3:53 PM, Kasper Daniel Hansen
<kasperdanielhansen at gmail.com> wrote:
Dan,
This error looks _very_ similar to what I reported regarding the use of
'foreach' inside a windows vignette, on the bioc-devel email list. As you
say, it looks funny that it lists the tex file, yet fails to find it.
It's not looking for the TeX file, but the PDF file - that is what the
error message is referring to by "Failed to locate the 'texi2pdf'
output file". [ Note that in this error message I use the term
"vignette" in a conceptual sense, not necessarily the vignette
*source* file (here *.Rnw) - maybe that is what is confusing. ]
Immediately after calling tools::texi2pdf("OrganismDbi.tex"), the code
tries to locate the texi2pdf output file, that is, 'OrganismDbi.pdf',
which it cannot find. This indicates that tools::texi2pdf() gave an
error (an error message which is currently not reported/available),
which in turn indicates that the 'OrganismDbi.tex' file is
corrupt/incomplete.
The issue had to do with closing relevant connections (for foreach, this
was a Windows issue because the default foreach backend on Windows uses
connections). For my particular case, solving it was a bit difficult
because I could not just close all connections since a vignette is being
run inside sink().
The package name makes me suspect a database connection. As a starting
point I suggest closing all existing connections in the vignette.
I think it's worth looking into what Kasper says - that's hopefully the reason.
/Henrik
PS. I do find it odd that these issues starting to occur now, because
most of the vignette framework is performing the same steps as in R (<
3.0.0). The main difference is see is that it now validates/asserts
that the expected output file is there *immediately* after trying to
generate them (using weave, tangle, and texi2pdf). If for some reason
texi2pdf generates the PDF in a background process which is not
completed in full when returning the control to R, then the PDF is not
there and you would get this error. I don't know if this can happen.
The reason why I came to think of this is because I recall that I've
seen this behavior when using bitmap() and Ghostscript to create PNGs.
Just a shot from the hip, though.