-
-
Notifications
You must be signed in to change notification settings - Fork 872
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
Caching sql chunks throwing error when output.var not used #1842
Comments
Wow, this was a tricky bug. I think I can add to it. This behaviour is present even with
When it failed, I would change it to a generic code chunk, and then it would run ok once before failing again the subsequent run. Anyway, thanks for explaining this weird behaviour! This was my chunk options and code:
|
I ran into this bug and noticed that I can work around it by switching engines from The real code can be found here. |
Thanks. I still don't know why we have an issue but this will be providing a base for comparison. For reminder, the issue happens in Using |
Oh I know now ! Lines 160 to 163 in 039b6cf
We are specifically storing It seems the @yihui I send a PR for a small fix, but we can discuss there if we need to handle this more deeply |
Wow, thanks for looking into this! Perhaps there will be no need to give |
Not sure to understand. You mean I think this could already be done by using Not sure if this is a recommended pattern to do this, but this would work. To a more generic cache mechanism for engine, I believe it require refactor and this is a bigger project started to be tackled in #1505 This would indeed by clearer, and allow wrapper engine to call a cache_engine function probably. |
Sounds good, thank you for working on that. |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
I'm having trouble knitting an Rmd when I set
cache=TRUE
for sql code chunks.There is some discussion of a related error #1544 and rstudio/rmarkdown#914, but those examples seem to be when
output.var
is set in the sql chunk and the bug was fixed a couple years ago.The following Rmd will knit the first time, but the second time when it tries to read from the cache, I get this error:
When
cache=FALSE
, the error goes away.This issue was previously posed on RStudio Community.
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: