[Python] plotly write_image() runs forever and doesn't produce any static image

Discussão em 'Python' iniciado por Stack, Julho 11, 2025.

  1. Stack

    Stack Membro Participativo

    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?

    Continue reading...

Compartilhe esta Página