You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting this! I've pushed a fix in commit b1103b2.
The issue was that the code was using tryNULL(kaleido$scopes) to detect whether kaleido v1 was installed, but accessing a non-existent Python attribute can throw an AttributeError that doesn't always get caught properly by R's tryCatch. The fix uses reticulate::py_has_attr() instead, which safely checks for attribute existence without triggering the error.
Would you mind reinstalling from GitHub and letting me know if this resolves the issue for you?
I had the same issue as @ZacharyHu0. The fix solves this error; however, on my Windows laptop I do now instead get the error
Error in py_run_string_impl(code, local, convert) :
File "<string>", line 1
import json; fig = json.load(open('C:\Users\DOMINI~1\AppData\Local\Temp\Rtmpa49Ihy\file26a4639245df.json'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
when running save_image(). It seems to me like the temporary file path is not adjusted properly to use / instead of \ when being passed to py_run_string() within newKaleidoScope().
Edit:
As a suggestion, the line 138 in the file kaleido.R should read normalizePath(tmp_json, winslash = "/").
Activity
[-]save_image not working in[/-][+]save_image not working in python-kaleido v1[/+]ZacharyHu0 commentedon Jan 23, 2026
here's my Conda list:
Fix save_image() compatibility with kaleido v1 (#2475)
cpsievert commentedon Jan 23, 2026
Thanks for reporting this! I've pushed a fix in commit b1103b2.
The issue was that the code was using
tryNULL(kaleido$scopes)to detect whether kaleido v1 was installed, but accessing a non-existent Python attribute can throw anAttributeErrorthat doesn't always get caught properly by R'stryCatch. The fix usesreticulate::py_has_attr()instead, which safely checks for attribute existence without triggering the error.Would you mind reinstalling from GitHub and letting me know if this resolves the issue for you?
Thanks again for the detailed report!
dschulz13 commentedon Jan 25, 2026
I had the same issue as @ZacharyHu0. The fix solves this error; however, on my Windows laptop I do now instead get the error
when running
save_image(). It seems to me like the temporary file path is not adjusted properly to use/instead of\when being passed topy_run_string()withinnewKaleidoScope().Edit:
As a suggestion, the line 138 in the file
kaleido.Rshould readnormalizePath(tmp_json, winslash = "/").cpsievert commentedon Jan 26, 2026
Thanks for reporting. Would you like to contribute a PR and verify the fix?
dschulz13 commentedon Jan 27, 2026
I would love to, but unfortunately I do not have the time currently.
ZacharyHu0 commentedon Jan 30, 2026
I can confirm the fix works smoothly.
Thank you for your contribution to this community !
my Conda environment for reference: