rstudio / blastula

Easily send great-looking HTML email messages from R
https://pkgs.rstudio.com/blastula
Other
548 stars 85 forks source link

Connect: Pandoc error when using "flexdashboard" as the output format #165

Open MadhulikaTanuboddi opened 4 years ago

MadhulikaTanuboddi commented 4 years ago

When blastula::attach_connect_email is called from a flexdashboard, we see the following errors related to Pandoc

pandoc: /var/folders/58/x5dgwbg979z3db6nns_5zs940000gn/T//Rtmp3Ib98K/email5316638c224_files/figure-html/diamonds_plot-1.mb.png: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Execution halted

Steps to repro:

  1. Use the example https://github.com/rich-iannone/blastula/blob/master/inst/examples/connect-example-main.Rmd as a reference
  2. Change the output format from html_document to below output: flexdashboard::flex_dashboard
  3. Save and knit the example

You will see the pandoc error saying the path to the attachments is not found.

blastula_flexdashboard_issue

Additional example/repro can be found at https://github.com/colearendt/20200309-blastula-issue

jcheng5 commented 4 years ago

This looks relevant. https://github.com/rstudio/flexdashboard/blob/404cdac92d4bc1934e3b3a2c514daba0601d050a/R/flex_dashboard.R#L258-L273