-
Notifications
You must be signed in to change notification settings - Fork 36
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
Image generation hangs on windows 10 #110
Comments
Having the same issue 😢. |
If it's any help, I am now using wsl2 with ubuntu 20 for this. If it doesn't work on localhost, you can host it on |
If possible, it would be helpful to know if the instructions in this comment produce any additional logging info: #36 (comment) |
I tried doing it in cmd and jupyter notebook but it won't interrupt using ctrl+c/interrupt kernel. Any other ideas? |
Ok, thanks for giving that a try. The next idea is to try to run the kaleido executable CMD, without python. From python, run this to print out the (long) kaleido launch command import plotly.io as pio
print(' '.join(pio.kaleido.scope._build_proc_args())) Then run this from the CMD prompt. If successful, it would print out
along with some benign warnings. But if it hangs here, it would be great to record what is logged. |
Sorry about the late reply, this is what I get. |
+1 for similar issue with similar output as above |
Ok, thanks @ammaar8 and @leeTimothy. That's helpful. It's possible that the key error is
Although the After running that first command, could you try pasting the following content into the console and pressing Enter:
This is an actual image export request, and if successful would print out an SVG string. Again, it would be helpful to know if this prints out any warnings or errors, or if it hangs. Thanks! |
this might be where the behaviour im experiencing might deviate from @ammaar8 although running the output of
provides a very similar trace like ammaar
the command itself never runs to completion and just hangs there. if the behaviour deviates - please let me know if you want me to raise this separately. cheers |
@leeTimothy, the first command is intended to stay running and wait for image export requests. Did you try pasting the JSON snippet I described above and hitting enter? It would be good to know if this hangs, or if any additional info is logged. |
Ah apologies! Please see below.
|
Ok, thanks @leeTimothy. Here are a couple of experiments to try. The long kaleido command has a bunch of chromium flags. e.g. one of them is
If you, or anyone else, is interested in experimenting more with chromium options. Here's a giant list of the available chromium flags: https://peter.sh/experiments/chromium-command-line-switches/. |
Hey Jon, Apols for the late response - believe I may have narrowed it down slightly more. I've got access to 3 different W10 machines, 2 Running OS Build 19043+ both of which Kaleido doesn't currently work. @ammaar8 @guilhermebarrett can you confirm what OS build of W10 you're currently running? |
Hey @leeTimothy, Sorry for the late reply, I'm on 19043.1237 like you are! |
That version info helps a lot, thanks for investigating @leeTimothy and @ammaar8 |
@jonmmease I wasn't able to paste the string in the console. |
Just to add: I have three Windows 10 machines. Two work, these are builds 18363 and 19041. One machine freezes the exact way as described by everyone in this issue, build 19042. |
My machine with Windows build 19043.1237 does not work, but it works fine on a machine running 19042.1266. |
My machine with Windows build 19043.1237 also freezes when writing figures. Running the CMD script yields:
|
I'm seemingly having the same issue on Windows 10 Build 19043.1320. Has anyone figured out a workaround for this? |
I changed back to the other engine (orca?) |
It works with WSL for me |
I have the exact same issue. downgrading |
I am also having this issue on Windows 10 Build: 19043.1348.
|
Same issue here, with Windows 11 Version 10.0.22000 I was able to get it to work by downgrading |
I hope you find this helpful file: Kaleido\scope\base.py
|
I had the same result at @StSchulze ...downgrading to kaleido to 0.1.0post1 worked without any issues. |
any other work-arounds besides downgrading to kaleido 0.1.0post1? I'm on w11 machine, 22000.1455, have the same issue. Problem with downgrade is that you're unable to export images of large plots - i'm particularly speaking about ~30 million points heatmap, currently with many NaN points. |
same issue , downgrading to kaleido=0.1.0 works for me on windows 11 |
Same issue, Windows 10 19044.2846
Afterward, CMD started launching fine as well as Kaleido subprocess. I assume it is because Kaleido is being launched via Subprocess library with
And since CMD wasn't launching normally, there wasn't any output, any json to assume Kaleido readiness. |
Retried to reproduce the error today but the issue seems to have disappeared on my updated Windows 11 and Windows 10 machines. |
I got the same issue in Windows 11. |
I still have this issue on Windows 11 with kaleido 0.2.1. 0.2.1.post1 is for some reason niet available for my platform (windows 11, 64-bit processor, python 3.11) |
Sad for such a long time no one is fixing this |
After about 2 years of encountering this issue (plotly stalls or gets an error when writing plots to PNG on some computers I use, but not all) I found a solution. This does not seem to be linked to particular kaleido/plotly version combinations but essentially boils down to headless (or sort of headless) systems. kaleido (based on chromium, as I understood) can be launched with command line arguments that make it ignore GPU support, physical or xsever screens etc. However, these command line options need to be passed to kaleido from plotly. I got the idea here: https://discuss.streamlit.io/t/unable-to-run-plotly-kaleido-on-streamlit-cloud-to-generate-image-exports-from-graphs/23425/6 You can test this in Jupyer notebook:
Here's what happens behind the scenes:
If you launch the kaleido binary (e.g. from ... /lib/python/site-packages.... /kaleido on a headless system (like WSL, which is formally headless) , you will see a crash:
If you launch kaleido on the same headless system with above-mentioned command line arguments, it runs perfectly fine:
I'm not sure that there is a simple explanation why some version combinations of plotly and kaleido fixed the issue. I tried all of these suggestions (without success) before I encountered above-mentioned fix. And there is a logical explanation to it. |
I outcommented the |
@neuropathbasel Do you confirm it works for WSL but not Windows 11 natively? |
I have no Windows machine where I could try. Its an institutional Windows system with admin rights only within WSL. I have never used Python in Windows before.
…--
Dr. med. Jürgen Hench
Oberarzt, Neuropathologie
Universitätsspital Basel | Institut für Medizinische Genetik und Pathologie
Schönbeinstrasse 40 | CH-4031 Basel
Tel +41 61 328 6891 | Fax +41 61 265 3194
E-Mail: ***@***.***
http://pathologie.unispital-basel.ch
ü
Please consider our environment before printing out this e-mail.
Bitte denken Sie an unsere Umwelt, bevor Sie dieses E-Mail ausdrucken!
________________________________
Von: Antoine Jouanjean ***@***.***>
Gesendet: Dienstag, 21. Mai 2024 11:17:58
An: plotly/Kaleido
Cc: Hench Juergen, Dr.; Mention
Betreff: Re: [plotly/Kaleido] Image generation hangs on windows 10 (#110)
@neuropathbasel Do you confirm it works for WSL but not Windows 11 natively? Just tried on W11, Python 3. 11. 7, kaleido==0. 2. 1, but I got an error message (better than hanging forever though) — Reply to this email directly, view it on
ZjQcmQRYFpfptBannerStart
Diese Nachricht stammt von einem externen Absender
Diese Nachricht kam von ausserhalb Ihrer Organisation.
ZjQcmQRYFpfptBannerEnd
@neuropathbasel<https://urldefense.com/v3/__https://github.com/neuropathbasel__;!!EDSXHx-qqdzzoNk!tv6aMNnX5GLqCQXXaEjCwHY4Hxnvkrfiw7OHGAABfmdG88DFef1mYcimv6diVP7NKFFDdFP-XPsD5NXF_sZXxxOFcAI$> Do you confirm it works for WSL but not Windows 11 natively?
Just tried on W11, Python 3.11.7, kaleido==0.2.1, but I got an error message (better than hanging forever though)
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/plotly/Kaleido/issues/110*issuecomment-2122162630__;Iw!!EDSXHx-qqdzzoNk!tv6aMNnX5GLqCQXXaEjCwHY4Hxnvkrfiw7OHGAABfmdG88DFef1mYcimv6diVP7NKFFDdFP-XPsD5NXF_sZXULKsNho$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AOIQ23LB6MPNM7GTXEHSFOLZDMGMNAVCNFSM5DMFOE62U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSGIYTMMRWGMYA__;!!EDSXHx-qqdzzoNk!tv6aMNnX5GLqCQXXaEjCwHY4Hxnvkrfiw7OHGAABfmdG88DFef1mYcimv6diVP7NKFFDdFP-XPsD5NXF_sZXgjyvtdU$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
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 |
Any updates @gvwilson ? |
Hey, I'm trying to convert figures into static images but it refuses to work on windows 10. I am using this script for testing -
It just hangs forever. I tried with both kaleido and orca, same thing. I tried to find out where it was hanging using pycharm and it seems to be this line -
Kaleido/repos/kaleido/py/kaleido/scopes/base.py
Line 192 in 6a46eca
If you require anymore info let me know.
The text was updated successfully, but these errors were encountered: