0

Plotly fig.write_image() takes forever

and doesn't produce any image

I'm using

python 3.10.11 
Plotly 5.14.1 
kaleido 0.2.1

Win 11 22H2 
VSCode 1.78.2

when I try to execute a cell with fig.write_image('filename.png', format = 'png') the cell just runs forever without producing any .png files.

Task manager shows 3 kaleido.exe running processes.

Kaleido is installed to the same directroy as plotly (and other packages)

On the contrary, write_html() works perfectly with the very same graph and saves a .html graph in a second.

Minimally reproducible example:

import plotly.express as px
fig = px.line(x=[0,1,2], y=[0,1,2])
fig.write_image("plot.png", format = 'png', width = 500, height = 500, scale = 1, engine = 'kaleido')

Similar questions: 1, 2, 3

Kinda working solution: downgrading kaleido to version 0.1.0.post1 kinda solved the issue,

but is there a way to make kaleido 0.2.1 working?

Konstantin Z
  • 146
  • 7
  • 1
    I am also unable to output with the latest version, so I am using the version down with the [information](https://community.plotly.com/t/static-image-export-hangs-using-kaleido/61519/3) from this post. I have not come across any new information on this yet. – r-beginners May 22 '23 at 11:55

0 Answers0