簡體   English   中英

Pandoc 退出代碼 7 到 html 文檔的轉換錯誤(在 Dockerized 環境中使用 Rmarkdown、Flexdashboard &knitr)

[英]Pandoc exit code 7 conversion error to html document (using Rmarkdown, Flexdashboard &knitr in Dockerized environment)

我正在使用 Pandoc 將 Rmarkdown 文檔轉換為 html 文檔。

rmarkdown::render('ReportTemp.Rmd', output_file = paste0('TestDocument', '_', filename_invoice, '.html'),
                    envir = new.env(parent = globalenv()),
                    run_pandoc = TRUE) 

在 Rstudio 中本地運行時,這很好用。 但是當在 dockerized 設置中運行它時,編織部分似乎運行良好,但隨后我收到了這個奇怪的錯誤消息。


output file: ReportTemp.knit.md

/usr/bin/pandoc +RTS -K512m -RTS ReportTemp.utf8.md --to html4 --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output Report_fake.html --email-obfuscation none --standalone --section-divs --template /usr/local/lib/R/site-library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable 'theme:cosmo' --include-in-header /tmp/Rtmp95MPQt/rmarkdown-str179e2a9e3.html --mathjax --variable 'mathjax-url:ReportTemp_fake_files/mathjax-local/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --metadata pagetitle=DocssReportTemp.utf8.md --include-in-header /tmp/Rtmp95MPQt/file17545e146html --highlight-style pygments --include-before-body /tmp/Rtmp95MPQt/file1515f007c.html --include-after-body /tmp/Rtmp95MPQt/file15bd062c2.html

Error : pandoc document conversion failed with error 7

我在 pandoc 手冊中找不到關於此退出代碼 7 的任何內容。它似乎根本不存在。

它似乎生成了正確的 md.-format,但無法將其轉換為 html 文檔。

有誰知道這段代碼以及發生了什么?

我個人認為這與 Rstudio 調用 pandoc 的方式以及 R-base 在About Pandoc & Rstudio上運行的平台有關

Rstudio 似乎在舊版本的 Pandoc (1.12.x) 中構建了一個版本。 這是否意味着較新版本的 pandoc (2.x) 不適用於 Rmarkdown 2.1.x?

在本地,在 Rstudio 我有

  1. R-base v3.6.3
  2. 平台:x86_64-w64-mingw32
  3. Rmarkdown v2.1;
  4. 針織 v1.28
  5. Flexdashboard V0.5.1.1
  6. Pandoc V2.9.2.1(這是一個單獨的安裝,可能是 Rstudio 使用了我不知道的不同版本)。

在我使用的泊塢窗圖像中:

  1. R-base v3.6.3
  2. 平台:x86_64-pc-linux-gnu
  3. Rmarkdown v2.1
  4. 針織 v1.28
  5. Flexdashboard V0.5.1.1
  6. 潘多克 V2.5

任何幫助將非常感激!

最后,它與我在 R 腳本開頭聲明/設置的環境變量有關。 仍然不確定它為什么調用退出代碼 7(以及此代碼的含義)。 但我很高興它沒有再發生。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM