Always good to try out new methods and see it go. I tried HUGO severally and at one point or another, it bluffs. So I was excited to learn that DISTILL is an easy way to create personal website. Therefore I just tried the example for creating website from DISTILL help which resulted into the error message "pandoc document conversion failed with error 6"!!, I have tried all suggestions on Google (re-installed pandoc and rmarkdown) without success. Does anyone have ideas about this? I am using R4.03 and the RStudio is the very latest.
Hi @Job_Nmadu,
Can you try running rmarkdown::pandoc_exec()
in a fresh R session within RStudio and share what it returns?
rmarkdown::pandoc_exec()
"C:/Users/JOBNMA~1/AppData/Local/Pandoc/pandoc"
Hmm, okay, this may be the issue. rmarkdown
is probably using your system version of pandoc rather than the one that comes installed with RStudio.
Could you also run rmarkdown::find_pandoc()
and Sys.getenv("RSTUDIO_PANDOC")
?
rmarkdown::find_pandoc()
$version
[1] ‘2.11.2’
$dir
[1] "C:/Users/JOBNMA~1/AppData/Local/Pandoc"
Sys.getenv("RSTUDIO_PANDOC")
[1] "C:/Program Files/RStudio/bin/pandoc"
It is indeed using a Pandoc version installed on your system, but that should work anyway.
Can you share the full console output you have for the pandoc command regarding this error ?
Thanks.
I tried HUGO severally and at one point or another, it bluffs.
Happy to here more about that too ! you can DM me to share your feedback, I would be very interested to know what frictions you had with blogdown
Not run:
library(distill)
create_website("mysite", "My Site")
Creating website directory mysite
Creating mysite/_site.yml
Creating mysite/index.Rmd
Creating mysite/about.Rmd
Rendering website...
Rendering: mysite/about.Rmd
|................. | 33%
ordinary text without R code
|................................. | 67%
label: setup (with options)
List of 1
$ include: logi FALSE
|..................................................| 100%
ordinary text without R code
"C:/Users/JOBNMA~1/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS about.utf8.md --to html5 --from markdown+autolink_bare_uris+tex_math_single_backslash --output about.html --lua-filter "C:\Users\JOBNMA~1\DOCUME~1\R\WIN-LI~1\4.0\RMARKD~1\RMARKD~1\lua\PAGEBR~1.LUA" --lua-filter "C:\Users\JOBNMA~1\DOCUME~1\R\WIN-LI~1\4.0\RMARKD~1\RMARKD~1\lua\LATEX-~1.LUA" --email-obfuscation none --standalone --variable toc-float=1 --highlight-style "C:\Users\JOBNMA~1\DOCUME~1\R\WIN-LI~1\4.0\distill\RMARKD~1\TEMPLA~1\DISTIL~1\RESOUR~1\ARROW~1.THE" --template "C:\Users\JOBNMA~1\DOCUME~1\R\WIN-LI~1\4.0\distill\RMARKD~1\TEMPLA~1\DISTIL~1\RESOUR~1\DEFAUL~1.HTM" "--metadata=link-citations:true" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f2056a84b02html" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f2042b6ce4html" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f2013a940a1html" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f207c85aahtml" --include-before-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f20b1b20cehtml" --include-before-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f2044c92aa9html" --include-before-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f2019e0f7bhtml" --include-after-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f205df25a31html" --include-after-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f207761b05html" --include-after-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f20198c2117html" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\rmarkdown-str3f2070ec7996.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpKwmp3W\file3f203547297bhtml"
Unknown highlight-style C:\Users\JOBNMA~1\DOCUME~1\R\WIN-LI~1\4.0\distill\RMARKD~1\TEMPLA~1\DISTIL~1\RESOUR~1\ARROW~1.THE
Error: pandoc document conversion failed with error 6
End(Not run)
Thank you. I believe this is related to
But I did not manage to reproduce.
It would be very much appreciated if your are willing to help me with this Latest version of distill not working properly with pandoc · Issue #214 · rstudio/distill · GitHub
As it is now the second times, I think we have an issue with Windows and Pandoc related to the custom theme used.
Maybe it is because of windows short path...
public_dir <- "C:/Users/Public/Documents/"
file.copy(distill:::distill_resource("a11y.theme"), public_dir)
[1] TRUE
theme_file <- list.files(public_dir, "a11y.theme", full.names = TRUE)
theme_file
[1] "C:/Users/Public/Documents/a11y.theme"
processing file: test.Rmd
|.................. | 25%
inline R code fragments
|................................... | 50%
label: setup (with options)
List of 1
$ include: logi FALSE
|.................................................... | 75%
ordinary text without R code
|......................................................................| 100%
label: unnamed-chunk-1
output file: test.knit.md
"C:/Users/JOBNMA~1/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to html5 --from markdown+autolink_bare_uris+tex_math_single_backslash --output test.html --lua-filter "C:\Users\JOBNMA~1\DOCUME~1\R\WIN-LI~1\4.0\RMARKD~1\RMARKD~1\lua\PAGEBR~1.LUA" --lua-filter "C:\Users\JOBNMA~1\DOCUME~1\R\WIN-LI~1\4.0\RMARKD~1\RMARKD~1\lua\LATEX-~1.LUA" --email-obfuscation none --self-contained --standalone --variable toc-float=1 --highlight-style "C:/Users/Public/Documents/a11y.theme" --template "C:\Users\JOBNMA~1\DOCUME~1\R\WIN-LI~1\4.0\distill\RMARKD~1\TEMPLA~1\DISTIL~1\RESOUR~1\DEFAUL~1.HTM" "--metadata=link-citations:true" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c533adc2html" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c69434960html" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c22de6ba5html" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c3bdeaf4html" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c5547651html" --include-before-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c55676b61html" --include-before-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c3a9e282html" --include-before-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c19341130html" --include-after-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c3b24aahtml" --include-after-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c318d1e8fhtml" --include-after-body "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c4ba7b88html" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\rmarkdown-str152c45e14c47.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --include-in-header "C:\Users\JOBNMA~1\AppData\Local\Temp\RtmpcjxMlP\file152c76196b57html"
Output created: test.html
Warning message:
In (function (category = "LC_ALL", locale = "") :
OS reports request to set locale to "en_US.UTF-8" cannot be honored
I am not so clear with the second part of this instruction.
4. Click the knit button. Does it work ? Paste the command line you have in the Rmarkdown pane below "output_file: test.knit.md"
Thanks a lot ! That is exactly what I was looking for!
It seems this work for you by moving the theme file. So I believe this is an issue with WINDOWS and path with space. Can you confirm if you have a space in your username ?
C:\Users\<user with space>\Documents
?
I manage to reproduce. This is a bug with rmarkdown and Pandoc
@Job_Nmadu I pushed a fix in a PR if you want to try
You can install with
remotes::install_github("rstudio/distill#236")
Thanks very much. The fix has corrected the error code 6 in my device
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.