-
Notifications
You must be signed in to change notification settings - Fork 42
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
Export to image on Ubuntu under Windows works only the first time #38
Comments
Adding data to the issue. Running $ps just noticed that there are many kaleido processes running in the background. PID TTY TIME CMD |
Hi @cesgarma, thanks for the report. The next thing you could try would be to call the kaleido native executable from the command line. There are some instructions for that in #26 (comment). These were written for Windows, but the approach is the same for Linux. Since you're export is working the first time, I expect everything will work up until the first time you enter All that said, it looks like folks have had trouble with using Chromium-based projects under WSL 1. See microsoft/WSL#648 and microsoft/WSL#2760. So it might not be possible to get this working reliably. I expect things will work better on WSL 2 since this is based on a true Linux VM instead of a Linux-to-windows translation layer. |
Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson |
I am using Ubuntu running on Windows 10 using WSL1 (https://ubuntu.com/tutorials/ubuntu-on-windows#1-overview).
The first time I run kaleido write_image function to export a PNG figure it works fine.
The second and subsequent times write_image function hangs. When I interrupt with the keyboard I get the following on the terminal:
I have left it run overnight and didn't finish so it definitely hangs.
^CTraceback (most recent call last):
File "main.py", line 43, in
barChart.graphBarChart(cfg.emotionalGraphFilename, cfg.outputImagesFolder, xAxisLabels, yAxisValues)
File "/home/soltuin/devsource/doc-to-pdf/doc-to-pdf/barChart.py", line 81, in graphBarChart
fig.write_image(fileName, width=barWidth, height=barHeight, engine="kaleido", validate=False)
File "/home/soltuin/pythonenvironments/neocemod/lib/python3.8/site-packages/plotly/basedatatypes.py", line 3251, in write_image
return pio.write_image(self, *args, **kwargs)
File "/home/soltuin/pythonenvironments/neocemod/lib/python3.8/site-packages/plotly/io/_kaleido.py", line 244, in write_image
img_data = to_image(
File "/home/soltuin/pythonenvironments/neocemod/lib/python3.8/site-packages/plotly/io/_kaleido.py", line 130, in to_image
img_bytes = scope.transform(
File "/home/soltuin/pythonenvironments/neocemod/lib/python3.8/site-packages/kaleido/scopes/plotly.py", line 102, in transform
response = self._perform_transform(
File "/home/soltuin/pythonenvironments/neocemod/lib/python3.8/site-packages/kaleido/scopes/base.py", line 218, in _perform_transform
response = self._proc.stdout.readline()
I looked at the kaleido/scopes/base.py line 218 and it seems to be waiting for a response from kaleido process? (I don't know kaleido internals)
Is there anyway I can debug this issue? add verbose of some sort?
The text was updated successfully, but these errors were encountered: