Hello! I encountered this weird error during a workshop.. we were trying to render a brand new and default Quarto document. The YAML header is essentially like this:
title: YAML
format: html
The error message:
can not read an implicit mapping pair; a colon is missed at line 5, column 4:
{r}
^
Stack trace:
can not read an implicit mapping pair; a colon is missed at line 5, column 4:
{r}
^
at generateError (file:///C:/Users/uname/AppData/Local/Programs/Quarto/bin/quarto.js:10476:12)
at throwError (file:///C:/Users/uname/AppData/Local/Programs/Quarto/bin/quarto.js:10479:11)
at readBlockMapping (file:///C:/Users/uname/AppData/Local/Programs/Quarto/bin/quarto.js:11096:28)
Quarto version is 1.5.55 with the latest R 4.4.1 and Rstudio Version: 2024.04.2. I've never seen this error before, really appreciate any pointers you can provide, thank you!
Sorry i should have been clearer: I was trying to render the default content in a Quarto document when it was first created. So the full document would look like this (in Source view)
---
title: "YAML"
format: html
---
## Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
## Running Code
When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
```{r}
1 + 1
You can add options to executable code like this
#| echo: false
2 * 2
The echo: false option disables the printing of code (only output is displayed).
I've had similar errors come up if there is a code chunk or callout (:::) above it that hasn't been closes properly - is the above code a complete reprex?