繁体   English   中英

如何修复 pandoc 转换失败并出现错误 61

[英]How to fix pandoc conversion failed with error 61

我最近将 R 更新到 3.6.0,从那以后我无法编织任何 .RMD 文件而不会收到“错误:pandoc 文档转换失败,错误 61”。 我已经搜索并用谷歌搜索了我能想到的所有内容,但找不到解决方案。 我也不知道如何获得可重新创建的文件,但希望有人看到此错误或知道如何修复它?

Could not fetch http://?/UNC/ad/userfiles/***/R/R-3.6.0/library/rmarkdown/rmd/h/default.html
HttpExceptionRequest Request {

host                 = ""

port                 = 80

secure               = False

requestHeaders       = []

path                 = "/"

queryString          = "?/UNC/ad/userfiles/***/R/R-3.6.0/library/rmarkdown/rmd/h/default.html"
method               = "GET"

proxy                = Nothing

rawBody              = False

redirectCount        = 10

responseTimeout      = ResponseTimeoutDefault

requestVersion       = HTTP/1.1

}

(InvalidDestinationHost "")

Error: pandoc document conversion failed with error 61

这个问题(至少在我的情况下)源于使用的rmarkdown库是一个网络文件夹(在你的情况下/UNC/ad/userfiles/***/R/R-3.6.0/library/rmarkdown/rmd/h/default.html )。 R 无法访问此文件夹,因为缺少权限。

您必须将默认库更改为您拥有完全权限的位置。 例如“C:/Program Files/R/R-3.6.2/library”。

在 RStudio 中,单击Tools > Install Packages.."Install to library" you can see the default option (in your case it should be /UNC/ad/userfiles/***/R/R-3.6.0/library /rmarkdown/rmd/h/default.html`)。 这里的第二个选项应该是“C:/Program Files/R/R-3.6.2/library”。

要更改此顺序,即制作C:/Program Files/R/R-3.6.2/library (在 Windows 上)或/Library/Frameworks/R.framework/Versions/3.6/Resouirces/library (在 macOS 上)文件夹默认文件夹,您必须使用以下代码(在新的 R 文件中执行代码):

bothPaths <- .libPaths()   # extract both paths
bothPaths <- c(bothPaths [2], bothPaths [1])  # change order
.libPaths(bothPaths )  # modify the order

之后,您可能需要再次安装 markdown 包。 这次将直接安装到“C:/Program Files/R/R-3.6.2/library”文件夹中。

现在,编织应该可以工作了,因为 R 将直接从您拥有完整权限的文件夹中使用该包。

我有一个类似的问题,因为我升级了 de R 3.6(使用 Ubuntu 18.04 64 位,以防万一)

Could not fetch
https://tiles.bcn.cat/tiles/XYZ/GuiaBCN/18/132633/97883.png

HttpExceptionRequest Request {   
host                 = "tiles.bcn.cat"   
port                 = 443   
secure               = True   
requestHeaders       = []   
path                 = "/tiles/XYZ/GuiaBCN/18/132633/97883.png"   
queryString          = ""  
method               = "GET"   
proxy                = Nothing  
rawBody              = False   
redirectCount        = 10  
responseTimeout      = ResponseTimeoutDefault
requestVersion       = HTTP/1.1 
}  
(InternalException (HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa)))) Error: pandoc document conversion failed with error 61

因此在本文档上打针织: https ://gitlab.ajuntament.bcn/omd-gid/1905_pro_308_omd_curs_de_mapes_amb_r_modern_-_edicio_2020/blob/master/codi/09.mapes.Rmd#L1234

(锚点是在 Rmd 文件中调用该磁贴服务器的位置)

当前 pandoc(使用 R 3.6)是 pandoc 1.19.2.4 用 pandoc-types 1.17.0.5、texmath 0.9.4.4、skylighting 0.3.3.1 编译,这似乎有点旧(版权所有(C)2006-2016 John MacFarlane)

顺便说一句,我应该就堆栈溢出提出一个新问题,还是可以将它放在这里,因为它与你的有些相关,并且我们将两个可能相关的项目汇总在一起?

有同样的问题,挣扎了一段时间。 我在使用 Rstudio 1.3.1073 和 R 4.0.3 的代理(Windows 10)后面。

在我的情况下,额外的“无效方案”错误揭示了问题所在。 pandoc 需要的自动代理设置没有“http://”-part(方案部分)。

我在 .Renviron 中添加了:

R_USER="C:\Users\myUserName\Documents"

http_proxy=http://my.proxy:8080

重新启动 R 后,我终于能够使用样式表 (kable/kableExtra) 编织 html 输出。

显然,不应定义 https_proxy。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM