jimhester / knitrBootstrap

A framework to create bootstrap styled HTML reports from knitr Rmarkdown.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pandoc crashes rendering a knitrBootstrap document

znmeb opened this issue · comments

How to reproduce (on Fedora 20):

  • Install pandoc (1.12.3.3) from Fedora.
  • Install RStudio (0.98.1060).
  • Install knitr, rmarkdown and knitrBootstrap from Github via devtools.
  • Launch RStudio. Create a new RMarkdown document using "File -> New".
  • Change the YAML front matter to

---
  output:
    knitrBootstrap::bootstrap_document:
    title: "Test file"
    theme: amelia
    highlight: sunburst
    theme.chooser: TRUE
    highlight.chooser: TRUE
---  
  • Press the 'knit' button. The 'knitr' step looks like it's working but the Pandoc step crashes:
/usr/lib/rstudio/bin/pandoc/pandoc test.utf8.md --to html --from markdown-hard_line_breaks+superscript+tex_math_dollars+raw_html+markdown_in_html_blocks-implicit_figures --output test.html -H /tmp/RtmpKGorjc/knitr_bootstrap_full.html  
output file: test.knit.md
pandoc: Could not find data file templates/default.html
Error: pandoc document conversion failed with error 97
Execution halted
  • I don't know why RStudio is using the RStudio-shipped pandoc executable instead of the one I have with Fedora. That may be why it's crashing. If I get a chance I'll symlink the RStudio one and see if it helps.
  • Calling 'render' from the console also crashes the same way. knitrBootstrap::knit_bootstrap('test.Rmd') works, however.

Bingo - it's an RStudio problem! I renamed /usr/lib/rstudio/bin/pandoc and pressed 'knit' again. RStudio found Fedora's /usr/bin/pandoc and everything worked!

Actually maybe it's rmarkdown's "render" that's broken - I'll look at the code after my hackathon this weekend.

any news on this, I have the same problem. Fedora 21 also

I believe this might be an rmarkdown issue, could you post your sessionInfo(), Rstudio and pandoc version.

Thanks!

If you're on Fedora 21

  1. Install the pandoc, pandoc-siteproc and pandoc-pdf packages with 'yum'
  2. Go into /usr/lib/rstudio/bin and rename pandoc to pandoc.bak. You'll need to be root to do this, of course.
  3. Try again - it should work.

As far as I'm concerned, this is an RStudio bug - their installer carries a bunch of things that aren't needed everywhere and messes up the dependency algorithms. I just found another such gotcha a few days ago - a Qt webkit library wasn't getting installed because RStudio "provided" it.

I have code in OSJourno (https://bitbucket.org/znmeb/osjourno/src/ec40bf07286db049f6c4d9b02de1bfde418c1ee0/1SetUpWorkstation/Maint/sudo-build-rstudio-packages.bash?at=master) to build RStudio from source and I'm probably going to switch over to doing that before my final release. That way, I can have both RStudio Desktop and Server and I can clean the unused junk out of the packages before I ship them.

RStudio: Version 0.98.1091 (though it first occurred on the previous version)
rmarkdown: 0.3.1.0

sessionInfo()

R version 3.1.2 (2014-10-31)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] digest_0.6.4     htmltools_0.2.6  rmarkdown_0.3.10 tools_3.1.2      yaml_2.1.13