markdown 中的 googleVis 抛出错误 67
googleVis in markdown throws error 67
Markdown 以前在 html 中仅使用 Rstudio 'knit' 按钮就可以很好地呈现,现在不会了。这是 windows,R3.4.1,更新了 knitr 和 rmarkdown,上周一切正常。我有最小的 .rprofile,并且在编写下面的最小文档之前没有加载任何包。 'manual' 编织如下工作,即 gvisTable 和 mathjax 在 html 中正确呈现,所以这应该不是我今天的互联网连接的问题(我也尝试了替代连接但没有什么不同):
knitr::knit(进,出=md)
markdown::markdownToHTML(md,ht)
但是以下内容(我认为是 'knit' 按钮的作用,借鉴自 What does “Knit HTML” do in Rstudio 0.98?)会引发错误
rmarkdown::render(pp, 'html_document', 'new_titel.html')
中的错误消息相当长,所以我现在附加它,因为我缺乏声誉,所以 URL 被审查了。我试过谷歌搜索、SO 等,但没有结果。帮助表示赞赏。
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS tmp1.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output new_titel.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "censored" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "censored" --mathjax --variable "censored"
pandoc.exe: Could not fetch censored
HttpExceptionRequest Request {
host = "www.google.com"
port = 443
secure = True
requestHeaders = []
path = "/jsapi"
queryString = "?callback=displayChartTableID1d98417f33e7"
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
(InternalException (HandshakeFailed Error_EOF))
Warning: running command '"" +RTS -K512m -RTS tmp1.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output new_titel.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "censored" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "censored" --mathjax --variable "mathjax-url:censored-not-enough-reputation"' had status 67
Error: pandoc document conversion failed with error 67
----------------最小文档,如果我注释掉 gvisTable 行或使用上述 markdown 路由而不是 rmarkdown,它会呈现良好:
---
title: "Untitled"
output:
html_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
####title
body
$x=y$
```{r , echo=FALSE, results='asis'}
require(knitr)
kable(mtcars[1:2,])
require(googleVis)
gvisTable(mtcars)
```
几天前,我遇到了同样的问题,之前使用的 Markdown 文件可以正常显示。
我有 Windows 7 x64 SP1,R 版本 3.4.1,googleVis 0.6.2,rmarkdown 1.6,knitr 1.17。
有两种解决方法可以解决我的问题:
1)
运行 脚本
---
title: "Untitled"
output:
html_document:
self_contained: false
---
有效,尽管输出不再是独立的 HTML 文件,而是依赖于外部文件。
这对我来说不是一个选择,因为我需要能够与同事共享 HTML 文件。
2)
我发现的唯一其他修复方法是使用更新的 Pandoc 版本。我以前有 pandoc 1.17.2,现在 运行 pandoc 2.0.
你可以查看你的pandoc版本
C:\程序Files\RStudio\bin\pandoc
通过 运行 命令提示符中的命令 pandoc --version
。
我更新 Pandoc 的方式是
- 从下载夜间构建的 pandoc-windows-7c20fab3.zip
https://github.com/pandoc-extras/pandoc-nightly/releases/tag/hash-7c20fab3
- 解压并替换里面的pandoc.exe和pandoc-citeproc.exe
C:\程序 Files\RStudio\bin\pandoc
使用较新的版本(同时保留旧版本作为备份)。
运行 带有更新的 Pandoc 的 Markdown 脚本首先产生了一个错误(pandoc document conversion failed with error 2
),但是这个问题已通过
解决
---
title: "Untitled"
output:
html_document:
smart: false
---
可能不是最优雅的解决方案,但到目前为止是唯一对我有用的解决方案。
Markdown 以前在 html 中仅使用 Rstudio 'knit' 按钮就可以很好地呈现,现在不会了。这是 windows,R3.4.1,更新了 knitr 和 rmarkdown,上周一切正常。我有最小的 .rprofile,并且在编写下面的最小文档之前没有加载任何包。 'manual' 编织如下工作,即 gvisTable 和 mathjax 在 html 中正确呈现,所以这应该不是我今天的互联网连接的问题(我也尝试了替代连接但没有什么不同):
knitr::knit(进,出=md) markdown::markdownToHTML(md,ht)
但是以下内容(我认为是 'knit' 按钮的作用,借鉴自 What does “Knit HTML” do in Rstudio 0.98?)会引发错误
rmarkdown::render(pp, 'html_document', 'new_titel.html')
中的错误消息相当长,所以我现在附加它,因为我缺乏声誉,所以 URL 被审查了。我试过谷歌搜索、SO 等,但没有结果。帮助表示赞赏。
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS tmp1.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output new_titel.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "censored" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "censored" --mathjax --variable "censored"
pandoc.exe: Could not fetch censored
HttpExceptionRequest Request {
host = "www.google.com"
port = 443
secure = True
requestHeaders = []
path = "/jsapi"
queryString = "?callback=displayChartTableID1d98417f33e7"
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
(InternalException (HandshakeFailed Error_EOF))
Warning: running command '"" +RTS -K512m -RTS tmp1.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output new_titel.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "censored" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "censored" --mathjax --variable "mathjax-url:censored-not-enough-reputation"' had status 67
Error: pandoc document conversion failed with error 67
----------------最小文档,如果我注释掉 gvisTable 行或使用上述 markdown 路由而不是 rmarkdown,它会呈现良好:
---
title: "Untitled"
output:
html_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
####title
body
$x=y$
```{r , echo=FALSE, results='asis'}
require(knitr)
kable(mtcars[1:2,])
require(googleVis)
gvisTable(mtcars)
```
几天前,我遇到了同样的问题,之前使用的 Markdown 文件可以正常显示。 我有 Windows 7 x64 SP1,R 版本 3.4.1,googleVis 0.6.2,rmarkdown 1.6,knitr 1.17。
有两种解决方法可以解决我的问题:
1) 运行 脚本
---
title: "Untitled"
output:
html_document:
self_contained: false
---
有效,尽管输出不再是独立的 HTML 文件,而是依赖于外部文件。 这对我来说不是一个选择,因为我需要能够与同事共享 HTML 文件。
2) 我发现的唯一其他修复方法是使用更新的 Pandoc 版本。我以前有 pandoc 1.17.2,现在 运行 pandoc 2.0.
你可以查看你的pandoc版本
C:\程序Files\RStudio\bin\pandoc
通过 运行 命令提示符中的命令 pandoc --version
。
我更新 Pandoc 的方式是
- 从下载夜间构建的 pandoc-windows-7c20fab3.zip https://github.com/pandoc-extras/pandoc-nightly/releases/tag/hash-7c20fab3
- 解压并替换里面的pandoc.exe和pandoc-citeproc.exe C:\程序 Files\RStudio\bin\pandoc 使用较新的版本(同时保留旧版本作为备份)。
运行 带有更新的 Pandoc 的 Markdown 脚本首先产生了一个错误(pandoc document conversion failed with error 2
),但是这个问题已通过
---
title: "Untitled"
output:
html_document:
smart: false
---
可能不是最优雅的解决方案,但到目前为止是唯一对我有用的解决方案。