Closed truecluster closed 4 months ago
Thank you for reporting this, much appreciated! :pray: It's a YAML coercion problem.
I am also realizing that if someone had translated versions of the appendices, babelquarto would not find them.
Would you mind installing babelquarto from #48 to see whether it fixes your problem? I added a test that fails on main but passes with my changes, but I'd like your confirmation.
pak::pak("ropensci-review-tools/babelquarto@appendices")
Thanks Maelle, I still get
Error in `map()`:
ℹ In index: 1.
Caused by error in `purrr::map()`:
ℹ In index: 3.
Caused by error in `enc2utf8()`:
! argument is not a character vector
Run `rlang::last_trace()` to see where the error occurred.
which gives
> rlang::last_trace()
<error/purrr_error_indexed>
Error in `map()`:
ℹ In index: 1.
Caused by error in `purrr::map()`:
ℹ In index: 3.
Caused by error in `enc2utf8()`:
! argument is not a character vector
---
Backtrace:
▆
1. └─babelquarto::render_book(site_url = ret$url)
2. └─babelquarto:::render(...)
3. └─purrr::walk(...)
4. └─purrr::map(.x, .f, ..., .progress = .progress)
5. └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
6. ├─purrr:::with_indexed_errors(...)
7. │ └─base::withCallingHandlers(...)
8. ├─purrr:::call_with_cleanup(...)
9. └─babelquarto (local) .f(.x[[i]], ...)
10. └─purrr::map(...)
11. └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
12. ├─purrr:::with_indexed_errors(...)
13. │ └─base::withCallingHandlers(...)
14. ├─purrr:::call_with_cleanup(...)
15. └─babelquarto (local) .f(.x[[i]], ...)
16. └─fs::file_move(...)
17. └─fs::path_expand(path)
HTH, Kind regards
could you please share your Quarto configuration file? I guess this one is an encoding problem. :sweat_smile:
Doesn't look like an encoding issue. I could isolate the problem to
chapters:
- index.qmd
- part: "First Part"
chapters:
- summary.qmd
where summary.qmd has not all translations available: breaks as soon as summary.es.qmd
or summary.fr.qmd
is missing.
@truecluster thank you!
I tried reproducing the bug with d83081f
(#48)
But it does not create a bug. Could you either
Thank you for your patience and contributions!
Here is a minimal repo with summary.fr.qmd
made missing by renaming to summary.fr.qmd.txt
.
babeltest.zip
Dear Maelle, could you replicate with the repo in the zip? Kind regards
@truecluster sorry for the delay and thanks for the useful reprex, I've added a commit to https://github.com/ropensci-review-tools/babelquarto/pull/48
Can you please tell me whether using babelquarto from that branch works for you?
Note that I will be away at useR! in Salzburg next week, so probably even slower than usual.
The following YAML with only one chapter in the appendix gives an ERROR. If I move the summary as a second chapter in the appendix, it works.
Here the processing log: