Closed cregouby closed 1 year ago
+1 I think I've seen this problem too --- and I believe the issue is #2243 in knitr
. I guess updating the code to allow the aria label would have broken the previous fix discussed in #2248 in knitr
Thanks a lot for the report. This is indeed #2243 addition that breaks with Quarto because Quarto uses add_html_caption()
internals but without the new arguments.
I have a quick fix for Quarto but not sure if this is considered to be knitr to adjust or Quarto
thanks @cderv, this saved me many headaches
Is this going to be backported?
It has been already - see changelog on last 1.3 https://quarto.org/docs/download/
(hot fix milestone usually means backport eligible)
ok, I first saw the closed issue without "backport" label.
Downgrading knitr to 1.42 did not resolve this issue (html widgets not working). Rmarkdown version 1.22., Ubuntu 20.04. server.
Upon render, I get:
Error in 'value[[3L]]()`: ! Package 'knitr' version 1.43 cannot be unloaded: Error in unloadNamespace (package) namespace 'knitr' is imported by 'rmarkdown' so cannot be unloaded
Need to downgrade Rmarkdown as well? To which version? Fix coming soon? Thanks!
Why downgrade? If you can downgrade, you can upgrade knitr/rmarkdown to latest and do the same for Quarto. The issue is fixed in the latest version as stated.
Fix coming soon? Thanks!
Please do read earliest comment : https://github.com/quarto-dev/quarto-cli/issues/5702#issuecomment-1592561629
If you still encounter some issues on your side for something that happens to be closed as fixed, please do check really thoroughly on your side. Some advices for anyone in such situations:
Usually, we close an issue when this is fixed completely. Sometimes we may have missed some edge cases. it could happen. But in this situation, it is best after having done the above to open a new issue with a link to the other closed one. In this new issue you would provide all the required informations, including the versions of the tools.
Hope this will be helpful. It really help us be more efficient and help everyone correctly when these advices are followed. thank you !
Thank you for the very helpful comments and apologies for the beginner-level question. After posting my question, I noticed the topic was closed and wrongly thought nobody will see it, hence the double post.
I am running Rstudio in a very restricted hospital datalake VM, where the user can do very little. I have private R directory in which I can install my own R packages from CRAN, but that is about it. After some weeks of waiting, the admins just updated R and Rstudio and I assumed Quarto as well. Now I noticed we have a very old Quarto install (1.0.38), so I need to file a ticket and wait.
Thanks again for helping me out, learned a lot. After quite a few years on Rmarkdown, looking forward to getting familiar with Quarto.
@kporkka It seems you are running on Ubuntu.
You could install Quarto locally, as you do for R packages (assuming the linux dependencies such as wget
and ca-certificates
are available).
The following should install the latest stable version of Quarto into your home.
DIRECTORY="~/.local"
QUARTO_DIRECTORY="${DIRECTORY}/opt"
mkdir --parents "${QUARTO_DIRECTORY}"
ARCH=$(dpkg --print-architecture)
QUARTO_VERSION=$(wget -qO- https://quarto.org/docs/download/_download.json | grep -oP '(?<="version": ")[^"]*')
QUARTO_DL_URL="https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-${ARCH}.tar.gz"
wget --quiet "$QUARTO_DL_URL" -O quarto.tar.gz
tar -C "${QUARTO_DIRECTORY}" -xzf quarto.tar.gz
ln -fs "${QUARTO_DIRECTORY}/quarto-${QUARTO_VERSION}/bin/quarto" "${DIRECTORY}/bin/quarto"
rm -f quarto.tar.gz
Note: if quarto is not available after restarting your terminal, add PATH="$HOME/.local/bin:$PATH"
to your ~/.bashrc
, then source ~/.bashrc
.
Thanks a lot @mcanouil for your suggestion and trouble. All the outbound internet is closed, apart from selected CRAN servers. But will give it a whirl once on the server tomorrow or perhaps could try to humour some of the admins (w. coffee & candy) to help out. This seems like a nice community.
Dear @mcanouil, thank you for your suggestion. Downloading quarto v. 1.3.433 on my M1 MacBook Air solved the knitr 1.43 issue. However, I followed all the steps you suggested for installing the latest version of Quarto on my server running Ubuntu 20.04.6 LTS.
This installed Quarto v. 1.3.353, not 1.3.433 (validated using quarto check
)
Despite properly creating symlink and adding the path to "\~/.profile" and "\~/.bashrc", I am unable to render ggplotly objects using knitr 1.43.
Any help will be greatly appreciated! Thank you!
Hi,
I just wanted to mention that version 1.3.353 still has the problem of unable to render htmlWidgets like DT::datatable()
here a reprex of my problem.
---
title: "Timevis as qmd"
author: "Santiago Sotelo"
format: html
editor: visual
---
## 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).
pacman::p_load(DT, tidyverse)
DT::datatable(iris)
If this situation is fixed in the new quarto version v1.4.322, I think it should be moved from pre-release to release because it's hard to properly install this version for macOS users.
Let me know if there is a easier solution to render my htmlwidgets with my current version of quarto. Thanks.
Here is my sessionInfo()
sessionInfo() R version 4.3.1 (2023-06-16) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.5
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Lima tzcode source: internal
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] htmlwidgets_1.6.2 compiler_4.3.1 magrittr_2.0.3 fastmap_1.1.1 cli_3.6.1 htmltools_0.5.5 tools_4.3.1 rstudioapi_0.14 yaml_2.3.7
[10] DT_0.28 rmarkdown_2.22 knitr_1.43 xfun_0.39 digest_0.6.31 pacman_0.5.1 rlang_1.1.1 evaluate_0.21
quarto::quarto_version() [1] ‘1.3.353’
I just wanted to mention that version 1.3.353 still has the problem
@aito123 please do update to latest 1.3 version (currently 1.3.450). There was already a backport of this fix to 1.3 and it has the patch already.
I can confirm that updating Quarto solved the issue on Mac. Just download the file, run the installer, write quarto check
in terminal (in R studio if you use that) to confirm the version got updated and rerender your document.
I can also confirm that updating quarto to version 1.3.450 solved this issue on windows.
I downloaded and install quarto 1.4 on Ubuntu 22.04 and solved the problem.
Bug description
Hello,
Current situation
{knitr} has a recent update to v1.43 that makes rendering of R code chunks with htmlwidgets fails with
This is not specific to {DT}, but also occurs with other htmlwidgets related packages : {collapsibleTree}, ...
ReprEx
Reprex.qmd is the following (code chunk separator manually edited for correct rendering here):
Workaround
Downgrading {knitr} to 1.42 workaround the problem :
same rendering result with knitr 1.42
Session Info
quarto version
Rstudio version
Rstudio version ( as it also occurs in Rstudio ) : RStudio 2023.03.1+446 "Cherry Blossom" Release (6e31ffc3ef2a1f81d377eeccab71ddc11cfbd29e, 2023-05-09) for macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.03.1+446 Chrome/108.0.5359.179 Electron/22.0.3 Safari/537.36
quarto check
Checklist
quarto check
so we know which version of quarto and its dependencies you're running.