为什么Pandoc不检索图像文件? [英] Why Pandoc does not retrieve the image file?

查看:75
本文介绍了为什么Pandoc不检索图像文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在RStudio 0.98.501版上,我有一个很长的.Rmd文件,一旦单击KnitHtml按钮,就可以轻松将其转换为html.据我了解,编织"过程创建了几个文件夹,包括图像(一些图像由我自己手动添加),图形,缓存以及一个knitHtml文件夹,其中包含最终的.html文件.我最近下载了RStudio 0.98.894版(预览版),因为我想使用更多功能.现在,当我单击knitHtml时,出现以下错误:

On RStudio version 0.98.501 I had a long .Rmd file which was easily converted to html once I clicked KnitHtml button. The Knitting process, as I understand, created several folders including images (some manually added by myself), figures, cache and a knitHtml folder which included final .html file. I recently downloaded RStudio version 0.98.894 (preview release) because I wanted to use more features. Now, when I click knitHtml I get following error:

pandoc.exe: Failed to retrieve C:/Users/durraniu/Documents/Trajectory1/images/vissim-view.png InvalidUrlException "C:/Users/durraniu/Documents/Trajectory1/images/vissim-view.png" "Invalid scheme" Error: pandoc document conversion failed with error 61

如上所述,我将所有图像(包括vissim-view.png)从图像文件夹复制到knitHtml文件夹,然后再次单击按钮.这次它给出了与图像文件相关的相同错误,R将创建该错误,即绘图.我不知道该如何解决.请帮忙.

I copied all the images including the vissim-view.png as indicated above, from the images folder to the knitHtml folder and clicked the button again. This time it gave the same error related to image file which R would create i.e a plot. I don't know how to resolve this. Please help.

推荐答案

我遇到了类似的错误: pandoc.exe:找不到数据文件ProjectPart1_files/figure-html/sample_Mean_versus_Theoretical_Mean-1.png 错误:pandoc文档转换失败,错误为97

I encountered a similar error like this: pandoc.exe: Could not find data file ProjectPart1_files/figure-html/sample_Mean_versus_Theoretical_Mean-1.png Error: pandoc document conversion failed with error 97

页面上的一句话 解决了我的问题.

And one sentence from this page solved my problem.

如果遇到缓存输出问题,您总是可以通过删除文档目录中以_cache后缀命名的文件夹来清除knitr缓存."

"If you run into problems with cached output you can always clear the knitr cache by removing the folder named with a _cache suffix within your document’s directory."

发生错误时,在工作目录中确实存在一个名为"ProjectPart1_cache"的文件夹.我删除它后,该错误已消除.

When the error occurred, there exactly existed a folder with name like "ProjectPart1_cache" in the working directory. After I deleted it, the error was removed.

这篇关于为什么Pandoc不检索图像文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆