plotly / Kaleido

Fast static image export for web-based visualization libraries with zero dependencies
Other
349 stars 33 forks source link

fig.write_image doesn't stop execution #120

Open primerov opened 2 years ago

primerov commented 2 years ago

Hello,

I'm trying to export a static plotly image into png file, but it's not producing any file and jupyter cell is running indefinitely. If I'm running this code without export it runs just fine and produces the image.

path = r'L:\EXC25 Build Binder\RGB Engine\EXC250027\EXC250027-00.0012\LI_curves' # use your path os.chdir(path) data = pd.read_csv(r'L:\EXC25 Build Binder\RGB Engine\EXC250027\EXC250027-00.0012\LI_curves\blue_ID141C_mod_complete.txt', index_col=None, delimiter='\t', header=None) fig = go.Figure() fig.add_trace(go.Scatter(x=data.iloc[:,0], y=data.iloc[:,1], mode='lines+markers', name='data', line=dict(color='blue', width=4))) fig.show() fig.write_image('LI_curves_comp.png', engine="kaleido")

I installed kaleido using pip install -U kelido

python version is 3.10.0

I'm running the code in VSC v.1.62.1.

Could someone help me to debug what is wrong with my settings?

AjayKrishna76 commented 2 years ago

Same issue , tried many things. I am using WSL2 (as suggested in #87) but didn't work. Can anyone help

jakobbrown commented 2 years ago

Same issue on Windows 10, plotly 5.4.0, Kaleido 0.2.1. Running in Jupyter via Anaconda. Disabling mathjax doesn't help. Any assistance would be greatly appreciated.

ibaris commented 2 years ago

I have two laptop with the exact same environment. With one it works and with the other it doesn't. And since Nov 24, 2021 there is no solution. Do you at least have an alternative so I don't have to use kaleido anymore?

jakobbrown commented 2 years ago

@ibaris i have been using orca instead, which works for me, despite no longer being recommended by plotly anymore i don't think.

https://plotly.com/python/orca-management/

xeladsn commented 1 year ago

same issue here ! Python 3.9 using conda environment, Windows 11, plotly 5.10.0 and kaileido 0.2.1