-
Notifications
You must be signed in to change notification settings - Fork 324
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
Quarto fails to render htmlwidgets when running {knitr} 1.43 with Error in add_html_caption()
:
#5702
Comments
+1 I think I've seen this problem too --- and I believe the issue is #2243 in |
Thanks a lot for the report. This is indeed #2243 addition that breaks with Quarto because Quarto uses 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]`: 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. |
Please do read earliest comment : #5702 (comment) 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. 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 |
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. Any help will be greatly appreciated! |
Hi,
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()
|
@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. |
quarto 1.3.353 installed on bioc docker devel has an incompatibility with knitr when rendering HTML widgets (quarto-dev/quarto-cli#5702). Fixed in Quarto 1.3.433.
I can confirm that updating Quarto solved the issue on Mac. Just download the file, run the installer, write |
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
$ quarto check [✓] Checking versions of quarto binary dependencies... Pandoc version 3.1.1: OK Dart Sass version 1.55.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.3.353 Path: /Applications/quarto/bin [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.8.16 (Conda) Path: /usr/local/Caskroom/miniconda/base/envs/r-reticulate/bin/python Jupyter: (None) Jupyter is not available in this Python installation. Install with conda install jupyter [✓] Checking R installation...........OK Version: 4.2.1 Path: /Library/Frameworks/R.framework/Resources LibPaths: - /Library/Frameworks/R.framework/Versions/4.2/Resources/library knitr: 1.43 rmarkdown: 2.21 [✓] Checking Knitr engine render......OK
Checklist
quarto check
so we know which version of quarto and its dependencies you're running.The text was updated successfully, but these errors were encountered: