ramnathv / rcstatebin

Interactive Statebin Charts
http://ramnathv.github.io/rcstatebin
MIT License
12 stars 3 forks source link

pandoc document conversion failed with error 67 #6

Open JasonAizkalns opened 9 years ago

JasonAizkalns commented 9 years ago

I am receiving: Error: pandoc document conversion failed with error 67 when attempting to use Save as Web Page... within RStudio Version 0.98.1103. When using Save as Web Page... everything fails to build. However, if I use htmlwidgets::saveWidget(statebin(taxdata, share ~ state | description, control = "dropdown"), "index.html"), I receive the same error, but things appear to build okay.

The extended error message is as follows:

pandoc.exe: Could not fetch http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700
FailedConnectionException2 "fonts.googleapis.com" 80 False connect: failed (Connection timed out (WSAETIMEDOUT))
Error: pandoc document conversion failed with error 67
In addition: Warning message:
running command 'C:/Users/{user}/AppData/Local/Pandoc/pandoc C:\Users\\{user}\Documents\test.html --from markdown_strict --output C:\Users\{user}\Documents\test.html --self-contained --template C:\Users\\{user}\AppData\Local\Temp\RtmpcdV7ph\file183032d54e0.html' had status 67 

Not sure if this more of an RStudio error, but I am able to use the "Save as Web Page..." and htmlwidgets::saveWidget with other widgets successfully. Or perhaps this is driven by the call to fonts.googleapis.com?

ramnathv commented 9 years ago

I am unable to reproduce your error. Based on the error message you are getting, I presume it is an internet connectivity issue that is leading to pandoc complaining about a failed connection. A quick scan of SO brought me to this issue that confirms that it is a DNS failure issue.

Can you try saving it while connected to the internet from a different location?

JasonAizkalns commented 9 years ago

I will give that a try. Just weird that I haven't run into this issue before, but it wouldn't surprise me with the number of proxy hoops I jump through.

In addition, trying to knit an html document will fail with the same code, HOWEVER, modifying the YAML to:

output:
  html_document:
    self_contained: no

per this SO post will knit successful.

ramnathv commented 9 years ago

Strange. I am able to knit successfully even with self_contained: yes. Can you post your sessionInfo()? Make sure that you have the latest version of rcstatebin installed.

JasonAizkalns commented 9 years ago

It's a connection issue. Using the same setup/computer, I was able create/knit via multiple methods using a more public network.

Feel free to close this issue.

Must be something about the fonts.googleapis.com that this work proxy doesn't like? First time I've experienced this, however, with any widget. If you know of any workarounds/tips, I'd greatly appreciate them.

Keep up the amazing work and if I can help in any way, shape, or form, let me know.

JasonAizkalns commented 9 years ago

One more follow-up. Clarifying my comment above regarding htmlwidgets::saveWidget - again, this will throw the same error, however, it will build the file successfully. What's weird, and I'm not sure if this is expected behavior, is that it builds it as a non-self-contained file. Both with unnamed arguments and with named arguments, i.e., htmlwidgets::saveWidget(..., selfcontained = TRUE) .

Also, this issue from robkeh appears to be similar and looks like Ken, @timelyportfolio was able to do things with the base64enc lines.

ramnathv commented 9 years ago

That is weird indeed. I am unable to replicate the issue. saveWidget works correctly for me in being able to save to a self-contained file. @timelyportfolio, can you check if you can replicate this issue?

Christoph999 commented 8 years ago

Hi, I am new to Rstudio/Rmd but it seems I have the same error (path is to a mounted drive, nothing like http://...). Is there any update?

Edit: None of the following suggstions worked

pandoc.exe: Could not fetch H:/01%20Packages/GitDataTransport.png InvalidUrlException "H:/01%20Packages/GitDataTransport.png" "Invalid scheme" Fehler: pandoc document conversion failed with error 67 Zusätzlich: Warnmeldung: Ausführung von Kommando '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS workflow-and-style.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output workflow-and-style.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "C:\R\R-3.2.2\library\rmarkdown\rmd\h\default.html" --variable "theme:bootstrap" --include-in-header "C:\Users\sqc\AppData\Local\Temp\RtmpM9IPmg\rmarkdown-str1eac71293e10.html" --mathjax --variable "mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --no-highlight --variable "highlightjs=C:\R\R-3.2.2\library\rmarkdown\rmd\h\highlight"' ergab Status 67 Ausführung angehalten

carpiediem commented 8 years ago

I'm having the same problem as Christoph; pandoc is unable to fetch a local CSS file. This is using RStudio version 0.99.903. As in his case, I'm running Windows and the Rmd file being processed is on a different drive than RStudio (D:). I'm not sure if that's a factor or not. This is the code and the error.

## MorrisJS with Knit2HTML
```{r results = 'asis', comment = NA}
require(rCharts)
data(economics, package = 'ggplot2')
econ <- transform(economics, date = as.character(date))
m1 <- mPlot(x = 'date', y = c('psavert', 'uempmed'), type = 'Line',  data = econ)
m1$set(pointSize = 0, lineWidth = 1)
m1$print('chart2', include_assets = TRUE)

Error: 

output file: 2016-10-10-how-often-are-legco-members-absent.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS 2016-10-10-how-often-are-legco-members-absent.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output 2016-10-10-how-often-are-legco-members-absent.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "C:\Users\Ryan\Documents\R\win-library\3.3\rmarkdown\rmd\h\default.html" --variable "theme:bootstrap" --include-in-header "C:\Users\Ryan\AppData\Local\Temp\RtmpOYFqiG\rmarkdown-str224032b84b6b.html" --mathjax --variable "mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --no-highlight --variable "highlightjs=C:\Users\Ryan\Documents\R\win-library\3.3\rmarkdown\rmd\h\highlight" --variable "navigationjs=C:\Users\Ryan\Documents\R\win-library\3.3\rmarkdown\rmd\h\navigation-1.1" pandoc.exe: Could not fetch C:/Users/Ryan/Documents/R/win-library/3.3/rCharts/libraries/morris/css/morris.css InvalidUrlException "C:/Users/Ryan/Documents/R/win-library/3.3/rCharts/libraries/morris/css/morris.css" "Invalid scheme" Error: pandoc document conversion failed with error 67 In addition: Warning message: running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS 2016-10-10-how-often-are-legco-members-absent.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output 2016-10-10-how-often-are-legco-members-absent.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "C:\Users\Ryan\Documents\R\win-library\3.3\rmarkdown\rmd\h\default.html" --variable "theme:bootstrap" --include-in-header "C:\Users\Ryan\AppData\Local\Temp\RtmpOYFqiG\rmarkdown-str224032b84b6b.html" --mathjax --variable "mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --no-highlight --variable "highlightjs=C:\Users\Ryan\Documents\R\win-library\3.3\rmarkdown\rmd\h\highlight" --variable "navigationjs=C:\Users\Ryan\Documents\R\win-library\3.3\rmarkdown\rmd\h\navigation-1.1"' had status 67 Execution halted



Lastly, when I change the last line to `m1$save("export.html",standalone=TRUE)`, then knitr finishes successfully, with both HTML files looking as they should.

EDIT: There is, in fact, a file named morris.css in C:/Users/Ryan/Documents/R/win-library/3.3/rCharts/libraries/morris/css/.  Saving the Rmd file on the C: drive had the same effect, so that does not to be related.
carpiediem commented 8 years ago

Is there any way to have knitr/pandoc add script and link tags that reference a CDN copy of these libraries, instead of pasting in data:application/x-javascript;base64 versions?

ramnathv commented 8 years ago

No. I don't think that is possible.

carpiediem commented 8 years ago

In any case, I was able to find a fix for my workflow. Since I'm using the output md files in Jekyll (instead of the html files built in the final step), I was able to reference the style sheets & scripts the plot needs within my Jekyll template. Then, I just set include_assets to FALSE and knitr works fine.

That said, it would be great if the code above worked as well. I'll stay subscribed here, in case anyone else finds a solution.

peterbengkui commented 7 years ago

Seems it's firewall issue.

TimKettenacker commented 7 years ago

@carpiediem @Christoph999 I received exactly the same error message, but it turned out I made an incorrect reference to a locally stored image. Yet, it occurs to me that pandoc is not handling exceptions very well. So you might want to check your md references, in case this problem still prevails

Kapondo commented 7 years ago

I am experiencing the same error message. I am using Microsoft R Open (3.3.2) and Visual Studio 2015. I can do the Preview PDF and Word, but cannot do the HTML? I have installed the latest Pandoc. I am using rmarkdown 1.1. Thank you very much for all your help.

jnsi commented 7 years ago

Hello, I've the same issue when i configured the global options "retain markdown file source file. what to do now? thx jnsi

jnsi commented 7 years ago

...my sessioninfo() R version 3.3.3 (2017-03-06) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1

locale: [1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] backports_1.0.5 magrittr_1.5 rprojroot_1.2 htmltools_0.3.5 tools_3.3.3
[6] yaml_2.1.14 Rcpp_0.12.10 stringi_1.1.3 rmarkdown_1.4 knitr_1.15.1
[11] stringr_1.2.0 digest_0.6.12 evaluate_0.10

Thx jns

jnsi commented 7 years ago

...do you if pandoc package is available for R version 3.3.3 (2017-03-06)? thx

nperp commented 7 years ago

I am using saveWidget and I am getting the same error: pandoc document conversion failed with error 67

What I realized is that this error is fixed when I use a smaller filename. So, If the filename is higher than 45 characters long (including '.html') then there is this error popping up, otherwise everything is fine.

SymbolixAU commented 6 years ago

Try with the latest version of pandoc (2.1.1 at the time of writing this). This resolved this error for me on a different library.

rvlenth commented 5 years ago

I just had a similar issue, and it turned out that the error was resulted from my inst/doc directory being inadvertently deleted. I had a custom CSS file in there that I used for vignettes, and a custom document format that accessed that CSS file via system.file(). The fact that this was missing created the error.

For others, it may not be the same issue, but what I am saying is it can happen when some needed piece is missing.

sherrytp commented 5 years ago

I have the same issue and definitely changing the setup helps.

output:
  html_document:
    self_contained: no

However, all the graphs cannot be shown in the HTML file. My package version are listed: R version 3.5.1 rmarkdown_1.12 pandoc_version() [1] ‘1.19.2.1’

So I hope that information is enough for someone to work through this problem. Thanks, everyone!