-
Notifications
You must be signed in to change notification settings - Fork 328
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
closeAllConnections()
causes render and preview failure
#5214
Comments
This will even be an issue with knitr itself and not just Quarto or rmarkdown. It won't render either it you try to I never seen report of this yet. Can you point me with some package that does that ? Thanks |
Ah. I wonder if jupyter would face a similar issue. I'm not as well versed in python as I would like to know how to test that. I can, however, confirm that a regular rmd knit fails as you suggested it would. This was noticed in the I believe a UTD member is planning a PR there to remove the line, but I could see someone using it in their own code as well and not necessarily recognizing the error message and cause. |
FWIW I don't find any reference to such issue opened in one of the repo over time. It does not seem that common to use this feature. Maybe something has changed over time in R, but only thing we can do I think is to just error better like in r-lib/evaluate#23 but in another place. It seems the connection is altered and became invalid before the check was made. So overall, @yihui quite old issue r-lib/evaluate#23 but I think we need to protect better in evaluate, don't we ? |
Perhaps we should |
I was thinking of that yes. But the first one happens at
Seems like the all connection closing is make the |
…n: closeAllConnections() might have been called quarto-dev/quarto-cli#5214
Yes, and done: r-lib/evaluate@25c3ceb |
Awesome thanks @yihui ! @guslipkin I don't think we can do much more here in Quarto so I'll close this thread. Thanks a lot for the report! |
Version 0.21 ================================================================================ - `evaluate()` gains `log_echo` and `log_warning` arguments. When set to `TRUE` these cause code and warnings (respectively) to be immediately emitted to `stderr()`. This is useful for logging in unattended environments (#118). - Improved the error message when users accidentally called `closeAllConnections()` (thanks, @guslipkin, quarto-dev/quarto-cli#5214). Version 0.20 ================================================================================ - The arguments `keep_message` and `keep_warning` of `evaluate()` can take the value `NA` now, which means `evaluate()` will not capture the messages and they will be sent to the console. This is equivalent to the `FALSE` value before v0.19 (thanks, @gadenbuie, yihui/yihui.org#1458).
Bug description
I'm not sure how much can be done about this, but some packages use
closeAllConnections()
internally and therefore kill the connection to the quarto renderer.With this file:
quarto::quarto_preview()
produces a slightly more detailed error message thanquarto::quarto_render()
with:Details:
This appears to be cross platform, but my device info is as follows:
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: