Same Quarto file OK in one directory but errors in another

I have a test folder where I've worked out the changes to individual files that I need to make to change from a distil site to quarto. There are 6 quarto files in the test folder and a couple dozen in the target (was distil) folder. When I knit a file that runs fine in the test folder in the target folder, quarto renders the page but throws this error message:

ERROR: TypeError: Found non-callable @@iterator

Google doesn't turn up anything that I recognize as relevant (example). Can anybody suggest an approach (or a solution)?

The YAML, styles, and theme files are identical on both sides.

I'm also finding problems when quarto tries to render a leaflet map. :frowning:

Disappointing.

Continuing my exploration (and befuddlement) about Quarto.

I added a page to my quarto test site project that runs several code chunks (some data munging, a couple of ggplots, a couple gt tables, etc.) Now I get an error that I can't make sense of:

ERROR: unexpected character 'l' at line 1 col 1
Error running filter /Applications/quarto/share/filters/layout/layout.lua:
/Applications/quarto/share/pandoc/datadir/_json.lua:167: bad 'for' initial value (number expected, got nil)
stack traceback:
	/Applications/quarto/share/pandoc/datadir/_json.lua:381: in function '_json.decode'
	/Applications/quarto/share/filters/layout/layout.lua:3598: in function 'parseLayoutWidths'
	/Applications/quarto/share/filters/layout/layout.lua:4231: in function 'layoutCells'
	/Applications/quarto/share/filters/layout/layout.lua:4055: in function </Applications/quarto/share/filters/layout/layout.lua:4048>

Whether the extra page (which runs fine as an .Rmd file under distill) is listed in the _quarto.yml or not, just it's presence in the project directory causes other pages to fail in the rendering process. It seems that quarto aims to render all the pages in the project, even though I'm trying to render only one page.

I found the culprit. A leftover chunk option from {distill} makes Quarto crash. This snippet shows code that will make Quarto fail and produces the error messages shown above:

---
title: "A small example"
page-layout: article
---

```{r setup, layout="l-body-outset"}
mtcars[,1:3] |> head()

Hi @smithjd

Thanks for sharing your experience. Hopefully, we'll find time to explore together what works and does not work. I am happy to test anything with you. If you are able to share in a Github / Gitlab repo your project that would help me test.

Thanks for reporting this. I'll see how we can improve experience when converting from R Markdown to Quarto.

For the context, layout is an option in distill which is different in Quarto. So when converting from previous format, you need to make sure that options are correct to Quarto as it won't always be one to one equivalence.

We provided in knitr a function help converting to YAML syntax the chunks option knitr::convert_chunk_header() in Dev version. When in YAML form, you'll have then the help of the YAML auto completion and validation which should help. There is always room from improvment thought.

I'll report that in our repo thank you !

Happy to dig further with you other problem where examples would help (like the leaflet map). thanks !

Thanks, Christophe,

I did discover this knitr function late in the game... and it was incredibly useful.

I'm wondering whether this is the best place to bring up Quarto questions & issues or whether we're encouraged to go over to the Discussions tab on Github: quarto-dev/quarto-cli · Discussions · GitHub ?

The github discussion board is a better place for Quarto specific question IMO. All the team will see it, and Quarto community member can answer - they are not all watching this RStudio community website on the contrary

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.