Watts-College / cpp-524-fall-2021

https://watts-college.github.io/cpp-524-fall-2021/
1 stars 0 forks source link

Lab 5- knitting errors #24

Open kaseympotts opened 2 years ago

kaseympotts commented 2 years ago

I get the following errors when I go to Knit the file:

[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'lab-05-template.knit' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
File figures/post-test-only.png not found in resource path
Error: pandoc document conversion failed with error 99
In addition: Warning messages:
1: package 'dplyr' was built under R version 4.1.1 
2: package 'scales' was built under R version 4.1.1 
3: package 'pander' was built under R version 4.1.1 
Execution halted

-I'm not sure where to add the title to fix that part. I tried modelling it after previous assignments, but I'm guessing some amount of user error is happeneing. -There's a png in the file that didn't show; I assume that's where the second issue is (but again, not sure how to fix it). -I've check my version of RStudio and it's up-to-date.

Anyone have suggestions? I'd love to learn-by-doing to fix this file.

I double checked everywhere where I added the missing questions from the lab instructions; the template gives these same errors when I go to to knit it when it's blank, too.

I can knit to a Word doc just fine.

droach7 commented 2 years ago

I had this same problem as well. I tried adding a title by using and editing a title chunk from a previous lab but I still had the knitting error regarding the post-test-only.png and the pandoc error.

Not sure I can recommend anything to help, besides just letting you know you aren't alone in the struggle. For now I am just saving my lab, shutting down R and my computer and will try to knit it to HTML tomorrow and hope that it somehow magically works.

lecy commented 2 years ago

This is a weird issue I have not encountered before. I just tested the template stored on GitHub and it works fine, but then I downloaded it from the course page and for some reason the download strips off the YAML header in the file.

---
title: "Lab 5"
output:
  html_document:
    theme: readable
    df_print: paged
    highlight: tango
    toc: yes
    toc_float: no
---

Try right-clicking on this one and select "save-as" then save it as an RMD file, or just add the header back to the version you downloaded. That should fix the issue, though not sure why the header gets stripped during download?

https://raw.githubusercontent.com/Watts-College/cpp-524-fall-2021/main/labs/lab-05-template.rmd

IemanHamid commented 2 years ago

@droach7 and @kaseympotts even after I added the header it didn't work. Is it working for you now?

lecy commented 2 years ago

What won’t work? Are you getting the same error?

did you right-click on the link and select save-as?

IemanHamid commented 2 years ago

the title error is removed now, but I have a new error:

File figures/post-test-only.png not found in resource path Error: pandoc document conversion failed with error 99 Execution halted

asukajames commented 2 years ago

@lecy and @IemanHamid I am getting the same error as well.

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output test.html --lua-filter "C:\Users\ajames27\Documents\R\win-library\4.1\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\ajames27\Documents\R\win-library\4.1\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --template "C:\Users\ajames27\Documents\R\win-library\4.1\rmarkdown\rmd\h\default.html" --highlight-style tango --variable theme=readable --include-in-header "C:\Users\ajames27\AppData\Local\Temp\RtmpQlvIMP\rmarkdown-str74982ec539f.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" output file: test.knit.md

File figures/post-test-only.png not found in resource path Error: pandoc document conversion failed with error 99 Execution halted

lecy commented 2 years ago

Got it. It's trying to load an image it can't find.

Go ahead and delete this line (you don't need the image):

![](figures/post-test-only.png)

Or replace it with:

![](https://raw.githubusercontent.com/Watts-College/cpp-524-fall-2021/main/labs/figures/post-test-only.png)

IemanHamid commented 2 years ago

it worked for me now...Thank you

kaseympotts commented 2 years ago

Thank you! Just got home from work and was able to get it to knit.

ebossert commented 2 years ago

I'm having a strange issue where it will knit just fine but the HTML file goes from Question 2c to 6a and doesn't show any of the questions in between. Is there a fix for that?

lecy commented 2 years ago

@ebossert congrats, you win the unique issue this week. Does the text show up, just not in the table of contents?

Email me your RMD if you want me to take a look.

ebossert commented 2 years ago

Yay lol! The text doesn't show up at all, quite the mystery. I sent you an email. Thanks!