-
Notifications
You must be signed in to change notification settings - Fork 4
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
save_image - Permission denied error while calling renaming generated image in Chart::Kaleido::Plotly #58
Comments
Thank you for this detailed report! I don't have access anymore to a windows machine so if you don't mind to test some things I'll be glad to help. Please, try this example: (extracted from: https://metacpan.org/pod/Chart::Kaleido::Plotly#SYNOPSIS) use Chart::Kaleido::Plotly;
use JSON;
my $kaleido = Chart::Kaleido::Plotly->new();
# convert a hashref
my $data = decode_json(<<'END_OF_TEXT');
{ "data": [{"y": [1,2,1]}] }
END_OF_TEXT
$kaleido->save( file => "foo.png", plot => $data,
width => 1024, height => 768 ); |
I got the similar error with this example.
|
Ok! It seems a bug in Chart::Kaleido::Plotly. Please @stphnlyd could you look at this? Using the other engine for images: Orca should work fine: save_image(file => 'TestOrca.png', plot => $plot,
width => 1024, height => 768,
engine => 'orca'); But it requires the installation of Orca. With
|
@pablrod Sorry only saw this now. I will take a look maybe later this week. Sigh: Windows is hard for Perl. Actually I have another issue in Chart::Kaleido::Plotly with IPC::Run iynehz/perl5-Chart-Kaleido#1 If we can't easily solve this in the end, maybe we should use Orca by default on Windows. |
Orca could be a sensible default on Windows. Just let me know and I'll make the change! Thank you! |
I think @rai-gaurav 's idea of s/spew_raw/append_raw/ makes sense. I've released a new version of Chart-Kaleido to CPAN with that change. Will see if I can look IPC::Run later this week.. |
Chart-Plotly version - 0.041
OS - Windows 10
Perl - Strawberry 5.30.1
Just using the example mentioned here
This call to
save_image
is generating warning while running the script.The file is generated perfectly only facing error while renaming it. The error is generated in
Chart::Kaleido::Plotly
atI tried to dig more and found the documentation for 'spew_raw' here. There is a 'Note' section which mentions -
I have just tried to change the error generating line in
Chart::Kaleido::Plotly
to -and I am not getting any rename error and the final image file is generating fine. However, the other two lines of warning are still there
I have tested it on Windows, so not sure what will be the effect of this change on Linux and others.
Let me know if you want more details.
The text was updated successfully, but these errors were encountered: