html - Pandoc 退出代码 7 到 html 文档的转换错误(在 Dockerized 环境中使用 Rmarkdown、Flexdashboard &knitr)
问题描述
我正在使用 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 在关于 Pandoc & Rstudio上运行的方式有关
似乎 Rstudio 在旧版本的 Pandoc (1.12.x) 中构建。这是否意味着新版本的 pandoc (2.x) 不适用于 Rmarkdown 2.1.x?
在本地,在 Rstudio 我有
- R-base v3.6.3
- 平台:x86_64-w64-mingw32
- Rmarkdown v2.1;
- 针织机 v1.28
- Flexdashboard V0.5.1.1
- Pandoc V2.9.2.1(这是一个单独的安装,可能是 Rstudio 使用了我不知道的不同版本)。
在我使用的 docker Image 中:
- R-base v3.6.3
- 平台:x86_64-pc-linux-gnu
- 降价 v2.1
- 针织机 v1.28
- Flexdashboard V0.5.1.1
- 潘多克 V2.5
任何帮助将非常感激!
解决方案
最后,它与我在 R 脚本开头声明/设置的环境变量有关。仍然不确定它为什么调用退出代码 7(以及此代码的含义)。但我很高兴它没有再次发生。
推荐阅读
- javascript - 我在 Knex.JS 中遇到外键问题
- windows-subsystem-for-linux - 如何在 Windows 中浏览 WSL 2 中的文件系统
- javascript - 如何使用 highcharts.js 创建图表并调用 ajax?
- mongodb - 我如何在猫鼬中将 $gte 与其他值一起使用
- spring-boot - LocatDateTime 的 Spring Boot Bean 验证
- ssis - 如何使用 SSIS 将不同格式的 ID 从源映射到目标
- c++ - 没有包标识的 C++/WinRT ApplicationDataContainer
- ruby-on-rails - 在控制台中使用箭头键时 UTF-8 中的无效字节序列 (ArgumentError)
- c++ - 如何使用指针访问矩阵列的元素
- react-native - React Native 在后台推送本地通知(已终止)