-
Notifications
You must be signed in to change notification settings - Fork 14
Most common errors and pitfalls
Table of Contents generated with DocToc
This guide will describe the most common OTTR errors and pitfalls and how to address them.
When you open a pull request, you should see a report like this:
When you see an ❌ , click on the Details
button to see the error message. We'll discuss the most common error messages here.
Error example:
Error in png::readPNG(path, native = TRUE, info = TRUE) :
file is not in PNG format
Calls: local ... lapply -> FUN -> raster_dpi_width -> attr -> <Anonymous>
Execution halted
Error in Rscript_render(f, render_args, render_meta, add1, add2) :
Failed to compile <file_name>.Rmd
Calls: local ... <Anonymous> -> render_new_session -> Rscript_render
Execution halted
Error: bookdown::render_book() failed to render the output format 'bookdown::gitbook'.
Execution halted
What does this mean?:
Your Google Slides presentation you have tried to retrieve a slide from with ottrpal::include_slide()
is not public. Your Google Slide document must be set to Anyone with a link
. See this article for more details. The renders will fail if this is not set! See the setting up images and graphics section for more details.
Underneath a section that says something like: **Check spelling/url/quiz errors - fail if too many of them**
you may see something like:
Run exit 1
exit 1
shell: sh -e {0}
Error: Process completed with exit code 1.
This is failing on purpose -- it means that checker has found errors. Return to your pull request page and look for a comment that says something like:
⚠️ There are <spelling/quiz/url> errors that need to be addressed. Read this guide for more info.
Download the errors here.
Comment updated at <some_date> with changes from <commit>
Click on the Download the errors here
to see the list of errors and which files they were found in. For help in addressing these errors, click on the Read this guide for more info
button.
Error example:
CONFLICT (modify/delete): <file_name> deleted in <branch_name> and modified in HEAD. Version HEAD of <file_name> left in tree.
This will often happen when render-preview's git handling doesn't know which changes you are looking to preview. The easiest way to fix this problem is to create a separate pull request that completely deletes the files lists. To do this, follow these steps:
- Take note of your pull request's number. Go to the pull request page and see what
#number
is posted there. - On your GitHub repository, go to
Code
and click onBranches
. - Your pull request's preview is made on a branch named
preview-<number of your pull request>
. Find this branch and click the trash can icon. This will delete the preview branch and hopefully get rid of this error. Read this for more info on how to delete a branch. - Re-trigger your GitHub actions run and it should pass.
If you see an error like this:
Run Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')"
Error in yaml::yaml.load(..., eval.expr = TRUE) :
Parser error: while parsing a flow sequence at line 4, column 12 did not find expected ',' or ']' at line 11, column 13
Calls: <Anonymous> ... <Anonymous> -> resolve -> <Anonymous> -> yaml_load -> <Anonymous>
Execution halted
Error: Process completed with exit code 1.
It means that the formatting in your _bookdown.yml
is off. If you forget a comma, or quote, or a ]
this message will appear in the github actions preview run.
Take a careful look at the _bookdown.yml
. Keep in mind that _bookdown.yml rmd_files spec should look like this (indents, quotes, and commas included in this pattern):
rmd_files: ["index.Rmd",
"01-intro.Rmd",
"02-chapter_of_course.Rmd",
"new_file.Rmd",
"About.Rmd",
"References.Rmd"]
Commit the changes to your _bookdown.yml
and see if the preview GitHub action runs appropriately.
If you encounter any problems or have ideas for improvements to this template repository or this getting started guide, please file an issue here! Your feedback is very much appreciated.
Note all materials in this template are licensed CC-BY and can be repurposed freely with attribution.
- Getting started
- Start a new course!
- Start editing course files
- Content creation tips
- Setting up images and videos
- About citations
- About Docker
- Spell check
- URL check
- Generate docx output
- Borrowing chapters between courses
- Most common errors
- Choosing between platforms
- Publishing with Bookdown
- Publishing on Coursera
- Publishing on Leanpub
- Making quizzes private (Leanpub and Coursera)
- Set up user feedback method
- Change title and style
- Credits section
- Adding Google Analytics Traffic Tracking
- Release a course for public viewing