为什么Pandoc不检索图像文件?

编程入门 行业动态 更新时间:2024-10-26 11:21:50
本文介绍了为什么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不检索图像文件?

本文发布于:2023-11-25 13:44:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1629988.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像文件   Pandoc

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!