Skip to content

Commit e874b86

Browse files
Fix kaleido command bug (#2228)
The line needs access to the Python sys module to run. Otherwise it gives a missing package error.
1 parent 7fb95ed commit e874b86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/kaleido.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ kaleido <- function(...) {
107107
# Write the base64 encoded string that transform() returns to disk
108108
# https://github.com/plotly/Kaleido/blame/master/README.md#L52
109109
reticulate::py_run_string(
110-
sprintf("open('%s', 'wb').write(%s)", file, transform_cmd)
110+
sprintf("import sys; open('%s', 'wb').write(%s)", file, transform_cmd)
111111
)
112112

113113
invisible(file)

0 commit comments

Comments
 (0)