I am experiencing a strange behavior with PlotlyJS 0.18.11.
The first time I try “using” the package, Julia hangs. If I interrupt the process (CTRL-C, I am on Windows 10) I get error different error messages in VSCode or in the REPL launched from a command prompt (see below). But in both cases, after interrupting the process, a second attempt to “using” works, and I haven’t noticed any problems with plots. I am on Julia 1.9.3, Windows 10, and just downgrading to PlotlyJS 0.18.10 fixes the issue in the environments I tried.
The error message in the REPL seems similar to what has been reported in another thread, but I didn’t find any useful answer there: Cannot use PlotlyJS
PS. Error messages
In the REPL (launched from command prompt)
┌ Warning: Kaleido is not available on this system. Julia will be unable to save images of any plots.
└ @ PlotlyJS C:\Users\UserName\.julia\packages\PlotlyJS\qhYQ5\src\kaleido.jl:65
┌ Warning: InterruptException()
└ @ PlotlyJS C:\Users\UserName\.julia\packages\PlotlyJS\qhYQ5\src\kaleido.jl:66
In VSCode
ERROR: InitError: InterruptException:
Stacktrace:
[1] try_yieldto(undo::typeof(Base.ensure_rescheduled))
@ Base .\task.jl:920
[2] wait()
@ Base .\task.jl:984
[3] wait(c::Base.GenericCondition{Base.Threads.SpinLock}; first::Bool)
@ Base .\condition.jl:130
[4] wait(c::Base.GenericCondition{Base.Threads.SpinLock})
@ Base .\condition.jl:125
[5] _wait(t::Task)
@ Base .\task.jl:308
[6] wait
@ .\task.jl:347 [inlined]
[7] __init__()
@ PlotlyJS C:\Users\UserName\.julia\packages\PlotlyJS\qhYQ5\src\PlotlyJS.jl:167
[8] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
@ Base .\loading.jl:1115
[9] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
@ Base .\loading.jl:1061
[10] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
@ Base .\loading.jl:1506
[11] _require(pkg::Base.PkgId, env::String)
@ Base .\loading.jl:1783
[12] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base .\loading.jl:1660
[13] macro expansion
@ .\loading.jl:1648 [inlined]
[14] macro expansion
@ .\lock.jl:267 [inlined]
[15] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1611
[16] eval
@ .\boot.jl:370 [inlined]
[17] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base .\loading.jl:1903
[18] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base .\essentials.jl:819
[19] invokelatest(::Any, ::Any, ::Vararg{Any})
@ Base .\essentials.jl:816
[20] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
@ VSCodeServer c:\Users\UserName\.vscode\extensions\julialang.language-julia-1.56.2\scripts\packages\VSCodeServer\src\eval.jl:263
[21] (::VSCodeServer.var"#67#72"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer c:\Users\UserName\.vscode\extensions\julialang.language-julia-1.56.2\scripts\packages\VSCodeServer\src\eval.jl:181
[22] withpath(f::VSCodeServer.var"#67#72"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
@ VSCodeServer c:\Users\UserName\.vscode\extensions\julialang.language-julia-1.56.2\scripts\packages\VSCodeServer\src\repl.jl:274
[23] (::VSCodeServer.var"#66#71"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer c:\Users\UserName\.vscode\extensions\julialang.language-julia-1.56.2\scripts\packages\VSCodeServer\src\eval.jl:179
[24] hideprompt(f::VSCodeServer.var"#66#71"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
@ VSCodeServer c:\Users\UserName\.vscode\extensions\julialang.language-julia-1.56.2\scripts\packages\VSCodeServer\src\repl.jl:38
[25] (::VSCodeServer.var"#65#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer c:\Users\UserName\.vscode\extensions\julialang.language-julia-1.56.2\scripts\packages\VSCodeServer\src\eval.jl:150
[26] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging .\logging.jl:514
[27] with_logger
@ .\logging.jl:626 [inlined]
[28] (::VSCodeServer.var"#64#69"{VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer c:\Users\UserName\.vscode\extensions\julialang.language-julia-1.56.2\scripts\packages\VSCodeServer\src\eval.jl:255
[29] #invokelatest#2
@ .\essentials.jl:819 [inlined]
[30] invokelatest(::Any)
@ Base .\essentials.jl:816
[31] macro expansion
@ c:\Users\UserName\.vscode\extensions\julialang.language-julia-1.56.2\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]
[32] (::VSCodeServer.var"#62#63")()
@ VSCodeServer .\task.jl:514
during initialization of module PlotlyJS