generated from jhudsl/OTTR_Template_Website
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfaqs.Rmd
163 lines (117 loc) · 6.54 KB
/
faqs.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
---
output:
html_document:
toc: true
toc_float: true
---
## Search on OTTR docs
Search on the OTTR docs for what you are looking for. Note that first few entries are sponsored, the actually helpful stuff will be below that.
<script async src="https://cse.google.com/cse.js?cx=22c03a049bf7a472a">
</script>
<div class="gcse-searchbox-only"></div>
## Most Common Errors
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:
![](https://github.com/jhudsl/OTTR_Template/raw/main/resources/screenshots/gha-actions-error.png)
When you see an ❌ , click on the `Details` button to see the error message. We'll discuss the most common error messages here.
***
### `file is not in PNG format`: Google Slides permissions fail
_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.](https://support.wix.com/en/article/setting-permissions-for-google-drive-files-and-folders#:~:text=Settings%20Permissions%20for%20a%20Google,edit%20and%20comment%20as%20well.) The renders will fail if this is not set! See the [setting up images and graphics section](https://github.com/jhudsl/OTTR_Template/wiki/Setting-up-images-and-graphics) for more details.
***
### `Process completed with exit code 1.`: Spell check/url check/quiz format fail:
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.
***
### `CONFLICT (modify/delete)`: Merge conflict fail:
_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:
1) Take note of your pull request's number. Go to the pull request page and see what `#number` is posted there.
2) On your GitHub repository, go to `Code` and click on `Branches`.
3) 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](https://www.git-tower.com/learn/git/faq/github-delete-branch) for more info on how to delete a branch.
4) Re-trigger your GitHub actions run and it should pass.
***
### `Parser error: while parsing a flow sequence`: _bookdown.yml parse error
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.
### `404 error`: GitHub Action link to download and preview `.docx` file is returning a 404 error
If you get a 404 error after clicking the link while attempting to download the `.docx` file from the GitHub Action rendered previews, then add the following code to the end of the `_output.yml` file:
```
bookdown::word_document2:
toc: true
```
Commit the changes to your `_output.yml` and see if the preview GitHub action runs appropriately.
### `Error in if (title == x2) return(head) : the condition has length > 1`: Run bookdown render error
If you observe an error like this:
```
Error in if (title == x2) return(head) : the condition has length > 1
Calls: <Anonymous> ... split_chapters -> build -> sub -> is.factor -> prepend_chapter_title
Execution halted
Error: Process completed with exit code 1.
```
Then look at the `GA_Script.Rhtml` file and remove the following `html` frontmatter if it's present:
(at the beginning of the file)
```
<html>
<head>
<title>Title</title>
</head>
<body>
```
(at the end of the file)
```
</body>
</html>
```
## Content not rendering
Check that the config file is up-to-date. It should look like this: https://github.com/jhudsl/OTTR_Template/blob/main/config_automation.yml.
(be careful to keep your selections for the configuration you would like).
## Contact Info
If you have a question that's not addressed by this website or just wanna chat with us about something else, please email us at [email protected] OR you can [leave a GitHub issue here](https://github.com/jhudsl/OTTR_Template/issues/new).
We greatly appreciate any feedback! We are always looking for ways to improve OTTR so more open source courses can be made!