RStudio cannot find pandoc on Windows remote desktop

My company moved to Windows Remote Desktop.

When knitting an RMarkdown, I get this error: "pandoc.exe: \\: openBinaryFile: does not exist (No such file or directory)"

The system variable "RSTUDIO_PANDOC is set to "C:/Program Files/RStudio/bin/pandoc".

Using Powershell, I do indeed see the two executable files in that folder.

Any suggestions?

Just to be sure, can you check the result of

rmarkdown::find_pandoc()

to see if the version found by default is the one from RStudio or not ?

And can you provide the full pandoc command ?

I suspect there is something related to network drive. This does not mean that pandoc is not found but that there is a path seen as \\ and that it can't be found.

pandoc.exe: \\: openBinaryFile: does not exist (No such file or directory)

This could happen with one of the ressource in a network drive or something like that. This was / is a pandoc issue, I am not sure where we are on it.

Related issue:

The system does find pandoc:

$version
[1] ‘2.7.2’

$dir
[1] "C:/Program Files/RStudio/bin/pandoc"

However, when I knit the default RMarkdown file I get the error.

output file: test.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output test.html --email-obfuscation none --self-contained --standalone --section-divs --template "\\file01\apps\RLibrary\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "C:\Users\PeterP\AppData\Local\Temp\RtmpkVdgnd\rmarkdown-str251b8458b147.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --lua-filter "\\file01/apps/RLibrary/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "\\file01/apps/RLibrary/rmarkdown/rmd/lua/latex-div.lua" 
pandoc.exe: \\: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Execution halted

This only seems to be a problem on the remote desktop.

I think this comes from here. The Rmarkdown package is installed on a network drive and pandoc does not know how to handle that. There are some workarounds discussed here (like mounting the path)

It should have been fixed in pandoc however (Windows UNC Paths Broken · Issue #5127 · jgm/pandoc · GitHub) but maybe there is still issue.

_For reference, cross posted on GH: Issues · rstudio/rmarkdown · GitHub

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.