Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*knit* button fails on pandoc when rmarkdown::render() succeeds #5179

Closed
akatie opened this issue Aug 5, 2019 · 5 comments
Closed

*knit* button fails on pandoc when rmarkdown::render() succeeds #5179

akatie opened this issue Aug 5, 2019 · 5 comments

Comments

@akatie
Copy link

@akatie akatie commented Aug 5, 2019

System details

RStudio Edition : Desktop
RStudio Version :  1.2.1335
OS Version      :  Windows NT 10.0 (Sys.info()$release=="10 x64", Sys.info()$version=="build 17134")
R Version       :  R version 3.6.1 (2019-07-05) [Action of the Toes]

Steps to reproduce the problem

All files in personal repo
[akatie/tidy-text-mining] https://github.com/akatie/tidy-text-mining

  • open 02-sentiment-analysis.Rmd
  • attempt to *knit using button
  • 02-sentiment-analysis.utf8.md is created
  • pandoc fails
  • from console window run rmarkdown::render("02-sentiment-analysis.Rmd") succeeds
  • tried clearing cache, environment etc.

creation of blank RStudio project with just .Rmd file seems to succeed, can post that

Describe the problem in detail

(I have had this issue on a long term project in both [linux] server and [linux|windows] desktop versions, but unable to submit a reprex for issue creation)

There are both minor R warnings and minor knitr() warnings. After the knitr run from rmarkdown::render() there is a directory parse error (see the *.txt files in the repo). I suspect that the cumulative errors create regex or other parse challenges within the execution stream from the IDE.

Describe the behavior you expected

To knit my document :)

@akatie
Copy link
Author

@akatie akatie commented Aug 5, 2019

@ronblum I found a reprex. Silly how it happened, I was working on an NLP project and get_sentiments("AFINN") kept failing, so I pulled the tidy-text-mining code ... and broke it

@ronblum
Copy link
Contributor

@ronblum ronblum commented Aug 6, 2019

@akatie Thank you for reporting the issue! I don't see any *.txt files in the repo, though. What's the name of one of them? I'm running into an issue when running get_sentiments("AFINN"), and I'd like to compare them. Thanks!

@akatie
Copy link
Author

@akatie akatie commented Aug 6, 2019

What happens wrong
knitr log

What happens when I manually process the .utf8.md file
pandoc console output
What happens when I manually render the .Rmd file
`rmarkdown::render' console output

get_sentiments() fails because remote URL is no longer valid. I forked the code, commented out AFINN and was planning to test replacing the function with a manual creation of the file ... and ...

But it's August and corn is in and steak is thawing so I think I'll walk away from my computer by 3:30 instead

@akatie
Copy link
Author

@akatie akatie commented Aug 6, 2019

Based on prior experience with this sort of anomaly, I believe the warning messages that show after a console rmarkdown::render() have something to do with this issue. My theories are mere speculation because I haven't looked at any code.

`output file: 02-sentiment-analysis.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS 02-sentiment-analysis.utf8.md --to html4 --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+smart --output 02-sentiment-analysis.html --email-obfuscation none --wrap preserve --standalone --section-divs --table-of-contents --toc-depth 3 --template "C:\Users\akb\Documents\R\win-library\3.6\bookdown\templates\gitbook.html" --highlight-style pygments --number-sections --css style.css --include-in-header "C:\Users\akb\AppData\Local\Temp\RtmpSUwAtd\rmarkdown-str4fa84e2d2073.html" --mathjax --metadata pagetitle=02-sentiment-analysis.utf8.md --include-in-header "_includes\analytics.html"

Output created: sentiment.html
Warning messages:
1: The label(s) financial not found
2: The label(s) usenet not found
3: The label(s) tidyausten not found

`

@jmcphers
Copy link
Member

@jmcphers jmcphers commented Oct 17, 2019

This is likely resolved with the updated 1.2 release, which includes a new version of pandoc. Please let us know if that doesn't take care of it for you!

https://rstudio.com/products/rstudio/download/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants