-
Notifications
You must be signed in to change notification settings - Fork 17
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
rmdshot doesn't work when i add a params argument #52
Comments
I tried editing the function to include p in the parameters but this time I got an error saying the params = list(1) is unused |
i edited the rmdshot function to be: |
Thanks for the issue report @egehankinik! I can reproduce the error with the following ---
title: "Issue 52"
output: html_document
runtime: shiny
params:
n_breaks: 35
---
Here's an R Markdown document with `runtime: shiny` and `params`.
The value of `params$n_breaks` is `r params$n_breaks`. Trying to screenshot the document causes this error: webshot2::rmdshot(
"issue-52.Rmd",
file = "issue-52.png",
rmd_args = list(params = list(n_breaks = 20))
)
#' Error:
#' ! argument "p" is missing, with no default
#' ---
#' Backtrace:
#' ▆
#' 1. └─webshot2::rmdshot("issue-52.Rmd", file = "issue-52.png", rmd_args = list(params = list(n_breaks = 20)))
#' 2. └─webshot2:::rmdshot_shiny(...)
#' 3. └─webshot2:::wait_until_server_exists(url) I also came to a similar conclusion as you as to the changes needed to fix this. I'll wrap those up in a PR shortly. |
When I use the rmdshot function on a shiny runtime rmd file, it works fine. However, when I use it with the added rmd._arg = list(params = list(n=1)), I get the error "Warning: Error in wait_until_server_exists: argument "p" is missing, with no default". In the package the wait_until_server_exists function is defined with two expected parameters, url and p however the rmdshot function only provides the URL parameter to the function which, I assume, is the reason for the error, but then why does it work without the parameters?
The text was updated successfully, but these errors were encountered: