I am encountering an error with WGLMakie.jl in Pluto.jl. WGLMakie was working for quite some time until I updated my packages. Now it freezes and outputs the error message below in the terminal. I tried reverting back to the previous package versions, but I could not perfectly replicate it because I am not using Plutoβs native environment support (due to technical requirements for the project). Iβm not sure whether a dependency of a dependency is causing the error. Any help would be appreciated
Error
Summary
Warning: Processing message failed for unknown reason:
β parentbody =
β Dict{Any, Any} with 3 entries:
β "payload" => Dict{Any, Any}("mouseup"=>0)
β "msg_type" => "0"
β "id" => "34697"
β exception =
β KeyError: key "client_id" not found
β Stacktrace:
β [1] getindex(h::Dict{Any, Any}, key::String)
β @ Base ./dict.jl:477
β [2] (::Pluto.var"#384#395"{Pluto.ServerSession})(clientstream::HTTP.WebSockets.WebSocket)
β @ Pluto ~/.julia/packages/Pluto/Bzt83/src/webserver/WebServer.jl:227
β [3] upgrade(f::Pluto.var"#384#395"{Pluto.ServerSession}, http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.Connections.Connection{Sockets.TCPSocket}}; suppress_close_error::Bool, maxframesize::Int64, maxfragmentation::Int64, nagle::Bool, quickack::Bool, kw::@Kwargs{})
β @ HTTP.WebSockets ~/.julia/packages/HTTP/MIUdD/src/WebSockets.jl:458
β [4] upgrade
β @ ~/.julia/packages/HTTP/MIUdD/src/WebSockets.jl:427 [inlined]
β [5] (::Pluto.var"#383#393"{Pluto.ServerSession, Pluto.var"#285#287"{Pluto.var"#288#290"{HTTP.Handlers.Router{typeof(Pluto.default_404_response), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}})(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.Connections.Connection{Sockets.TCPSocket}})
β @ Pluto ~/.julia/packages/Pluto/Bzt83/src/webserver/WebServer.jl:204
β [6] #invokelatest#2
β @ ./essentials.jl:1055 [inlined]
β [7] invokelatest
β @ ./essentials.jl:1052 [inlined]
β [8] handle_connection(f::Function, c::HTTP.Connections.Connection{Sockets.TCPSocket}, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing, verbose::Int64)
β @ HTTP.Servers ~/.julia/packages/HTTP/MIUdD/src/Servers.jl:469
β [9] (::HTTP.Servers.var"#16#17"{Pluto.var"#383#393"{Pluto.ServerSession, Pluto.var"#285#287"{Pluto.var"#288#290"{HTTP.Handlers.Router{typeof(Pluto.default_404_response), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.Connections.Connection}, Int64, Nothing, ReentrantLock, Int64, Base.Semaphore, HTTP.Connections.Connection{Sockets.TCPSocket}})()
β @ HTTP.Servers ~/.julia/packages/HTTP/MIUdD/src/Servers.jl:401
β @ Pluto ~/.julia/packages/Pluto/Bzt83/src/webserver/WebServer.jl:236
Code
Summary
begin
using Agents, WGLMakie
using AgentsExampleZoo
model = AgentsExampleZoo.daisyworld(;
solar_luminosity = 1.0, solar_change = 0.0, scenario = :change
)
model
end
begin
using Statistics: mean
black(a) = a.breed == :black
white(a) = a.breed == :white
adata = [(black, count), (white, count)]
temperature(model) = mean(model.temperature)
mdata = [temperature, :solar_luminosity]
daisycolor(a) = a.breed
agent_size = 20
agent_marker = 'βΏ'
heatarray = :temperature
heatkwargs = (colorrange = (-20, 60), colormap = :thermal)
agentsplotkwargs = (strokewidth = 1.0,) # add stroke around each agent
plotkwargs = (;
agent_color = daisycolor, agent_size, agent_marker,
agentsplotkwargs = (strokewidth = 1.0,),
heatarray, heatkwargs
)
params = Dict(
:surface_albedo => 0:0.01:1,
:solar_change => -0.1:0.01:0.1,
)
fig, abmobs = abmexploration(model;
params, plotkwargs..., adata, alabels = ["Black daisys", "White daisys"],
mdata, mlabels = ["T", "L"]
)
fig
end
Version Info
[46ada45e] Agents v6.2.10
[88acaeb2] AgentsExampleZoo v0.1.2
[10745b16] Statistics v1.11.1
[276b4fcb] WGLMakie v0.11.6
[c3e4b0f8] Pluto v0.20.8
Julia 1.11.5