-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
4 changed files
with
68 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,19 @@ PlotlyKaleido.kill_kaleido() | |
To enable LaTeX (using MathJax v2) in plots, use the keyword argument `mathjax`: | ||
```julia | ||
PlotlyKaleido.start(mathjax=true) # start Kaleido server with MathJax enabled | ||
``` | ||
|
||
## Windows Note | ||
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). | ||
|
||
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: | ||
```julia | ||
add Kaleido_jll@v0.1 | ||
``` | ||
inside the REPL package enviornment, or by calling the following code in the REPL directly: | ||
```julia | ||
begin | ||
import Pkg | ||
Pkg.add(; name = "Kaleido_jll", version = "0.1") | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
using Test | ||
import Pkg | ||
if Sys.iswindows() | ||
# Fix kaleido tests on windows due to [email protected] hanging | ||
Pkg.add(;name = "Kaleido_jll", version = "0.1") | ||
end | ||
@test_nowarn @eval using PlotlyKaleido | ||
|
||
@testset "Start" begin | ||
@test_nowarn PlotlyKaleido.start() | ||
@testset "Start" begin | ||
if Sys.iswindows() | ||
PlotlyKaleido.start() | ||
else | ||
@test_nowarn PlotlyKaleido.start() | ||
end | ||
@test PlotlyKaleido.is_running() | ||
end | ||
|
||
|