From 0413c5f753540a115378a99c9fb2f4f37825eef7 Mon Sep 17 00:00:00 2001 From: Quinten Goens Date: Mon, 30 Jan 2023 09:59:32 +0100 Subject: [PATCH] Fix kaleido command bug The line needs access to the Python sys module to run. Otherwise it gives a missing package error. --- R/kaleido.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/kaleido.R b/R/kaleido.R index d88cf2af15..97aa75549b 100644 --- a/R/kaleido.R +++ b/R/kaleido.R @@ -107,7 +107,7 @@ kaleido <- function(...) { # Write the base64 encoded string that transform() returns to disk # https://github.com/plotly/Kaleido/blame/master/README.md#L52 reticulate::py_run_string( - sprintf("open('%s', 'wb').write(%s)", file, transform_cmd) + sprintf("import sys; open('%s', 'wb').write(%s)", file, transform_cmd) ) invisible(file)