You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call the kaleido binary directly (fixes permission errors on Windows and Julia 1.10) (#17)
* point to kaleido.exe directly on windows
* try alternative
* remove hanging stuff
* remove `@test_nowarn` on start()
* put bck test_nowarn on non-windows
* warn about windows problem on README
* testnowarn error
* revert test_nowarn error
* Throw an error with a suggestion fix if kaleido seems to hang
* fix noblock function as bytesavailable does not work here
Copy file name to clipboardExpand all lines: README.md
+15
Original file line number
Diff line number
Diff line change
@@ -52,4 +52,19 @@ PlotlyKaleido.kill_kaleido()
52
52
To enable LaTeX (using MathJax v2) in plots, use the keyword argument `mathjax`:
53
53
```julia
54
54
PlotlyKaleido.start(mathjax=true) # start Kaleido server with MathJax enabled
55
+
```
56
+
57
+
## Windows Note
58
+
Many people one Windows have issues with the latest (0.2.1) version of the Kaleido library (see for example [discourse](https://discourse.julialang.org/t/plotlyjs-causes-errors-cant-figure-out-how-to-use-plotlylight-how-to-use-plotly-from-julia/108853/29), [this PR's comment](https://github.com/JuliaPlots/PlotlyKaleido.jl/pull/17#issuecomment-1969325440) and [this issue](https://github.com/plotly/Kaleido/issues/134) on the Kaleido repository).
59
+
60
+
Many people have succesfully fixed this problem on windows by downgrading the kaleido library to version 0.1.0 (see [the previously mentioned issue](https://github.com/plotly/Kaleido/issues/134)). If you experience issues with `PlotlyKaleido.start()` hanging on windows, you may want try adding `[email protected]` explicitly to your project environment to fix this. You can do so by either doing:
61
+
```julia
62
+
add Kaleido_jll@v0.1
63
+
```
64
+
inside the REPL package enviornment, or by calling the following code in the REPL directly:
# The content of this function is inspired from https://discourse.julialang.org/t/readline-with-default-value-if-no-input-after-timeout/100388/2?u=disberd
30
+
functionreadline_noblock(io)
31
+
msg =Channel{String}(1)
32
+
33
+
task =Task() do
34
+
try
35
+
put!(msg, readline(io))
36
+
catch
37
+
put!(msg, "Stopped")
38
+
end
39
+
end
40
+
41
+
interrupter =Task() do
42
+
sleep(5)
43
+
if!istaskdone(task)
44
+
Base.throwto(task, InterruptException())
45
+
end
46
+
end
47
+
48
+
schedule(interrupter)
49
+
schedule(task)
50
+
wait(task)
51
+
out =take!(msg)
52
+
out ==="Stopped"&&error("It looks like the kaleido process is hanging.
53
+
If you are on windows this might be caused by known problems with Kaleido v0.2 on windows.
54
+
You might want to try forcing a downgrade of the kaleido library to 0.1.
55
+
Check the Package Readme at https://github.com/JuliaPlots/PlotlyKaleido.jl/tree/main#windows-note for more details")
0 commit comments