Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website render error: package dependency version issue? #93

Open
blenback opened this issue Jan 29, 2025 · 14 comments
Open

Website render error: package dependency version issue? #93

blenback opened this issue Jan 29, 2025 · 14 comments

Comments

@blenback
Copy link

blenback commented Jan 29, 2025

Hello,
I am encountering an error when rendering a Quarto github pages site. The repo for the site is here: https://github.com/NASCENT-Peru/NASCENT-Peru.github.io.

This error is returned at the end of successfully rendering all of the .qmd files:

Output created: docs\index.html
Error in map():
ℹ In index: 1.
Caused by error in new_path[[i]] <- path(new_path[[i]], path_file(path)):
! more elements supplied than there are to replace
Run rlang::last_trace() to see where the error occurred.

Running rlang::last_trace() doesn't help me get to the root of the error:

Backtrace:
  1. ├─babelquarto::render_website()
  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. │           └─babelquarto:::filter_freeze_directory(...)
 11. │             └─fs::dir_copy(freeze_lang, fs::path(freeze_temp, freeze_dirs))
 12. └─base::.handleSimpleError(...)
 13.   └─purrr (local) h(simpleError(msg, call))
 14.     └─cli::cli_abort(...)
 15.       └─rlang::abort(...)
Execution halted
Error: Process completed with exit code 1.

However, the error is only occuring on one machine and I can't replicate it locally on another despite the fact that both machines are using the same version of babelquarto: 0.0.0.9000. Also the error occurs during my github action that is set up to render the website upon pushes to the main branch.

I have checked for differences in the versions of the package dependencies between my machines and there are some differences but I haven't been able to resolve what is causing the issue. From the error it would appear that the problem is with purrr however both machines are running the same version of this package: 1.0.2

Any suggestions?

@maelle
Copy link
Contributor

maelle commented Jan 30, 2025

Thank you for the bug report! I can reproduce so will investigate more.

Note that I haven't been good at updating babelquarto's version so what's more informative is the commit you installed it from.

@maelle
Copy link
Contributor

maelle commented Jan 30, 2025

@blenback one hypothesis I'd like to test is whether it'd work to

  • delete all _freeze entries
  • recreate them by rendering the site. Unfortunately when I render the website twice in a row no freeze entry is created?

@maelle
Copy link
Contributor

maelle commented Jan 30, 2025

@Nenuial pinging you in case you have time, since you're more knowledgeable about this part of the codebase.

@maelle
Copy link
Contributor

maelle commented Jan 30, 2025

Trying again after deleting docs/ too 🤔

@maelle
Copy link
Contributor

maelle commented Jan 30, 2025

this didn't recreate the freeze directory either.

@blenback
Copy link
Author

Thank you for the bug report! I can reproduce so will investigate more.

Note that I haven't been good at updating babelquarto's version so what's more informative is the commit you installed it from.

Hi @maelle thanks for looking into this. I checked the package description file on my two machines to get the git RemoteSha entries:

  • Machine with error: 71e23a2adceacf408337cbc2c2484fcac8ef6816
  • Machine WITHOUT error: b9be64a29fbbe06c2e8028f765a5929a66849092

@blenback
Copy link
Author

@blenback one hypothesis I'd like to test is whether it'd work to

  • delete all _freeze entries
  • recreate them by rendering the site. Unfortunately when I render the website twice in a row no freeze entry is created?

I deleted the _freeze dir and re-rendered and no error message.

@maelle
Copy link
Contributor

maelle commented Jan 30, 2025

but did it recreate your _freeze entries?

@maelle
Copy link
Contributor

maelle commented Jan 30, 2025

In babelquarto we're filtering the freeze entries of the correct language thanks to code by @Nenuial. I think something might have gone wrong for your website because you re-structured the website and therefore maybe there were "useless" freeze entries around, does that make any sense?

@blenback
Copy link
Author

but did it recreate your _freeze entries?

No it didn't

@blenback
Copy link
Author

In babelquarto we're filtering the freeze entries of the correct language thanks to code by @Nenuial. I think something might have gone wrong for your website because you re-structured the website and therefore maybe there were "useless" freeze entries around, does that make any sense?

It would very much sense as the re-structuring invovled moving .qmds into sub-dirs

@blenback
Copy link
Author

In babelquarto we're filtering the freeze entries of the correct language thanks to code by @Nenuial. I think something might have gone wrong for your website because you re-structured the website and therefore maybe there were "useless" freeze entries around, does that make any sense?

It would very much sense as the re-structuring invovled moving .qmds into sub-dirs

Hmm but actually the machine that did not produce the error still had the same _freeze dir present, so this can't be the reason then?

@maelle
Copy link
Contributor

maelle commented Jan 30, 2025

it can be the reason, as maybe the commit it installed from didn't have the freeze filtering yet.

@maelle
Copy link
Contributor

maelle commented Jan 30, 2025

Why are no new freeze entries created, is that expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants