"ERROR: No backend available (GLMakie, CairoMakie, WGLMakie)!" when calling "abm_video" in InteractiveDynamics.jl

Hi, I’m a quite new Julia user. I’m currently trying to implement a simple gas model using Agents.jl. To do this, I’ve been following a couple of tutorials from the docs, namely Continouos Covid19 and Flocking. To show the results, both examples call the abm_video function, in conjuction with calling using InteractiveDynamics and using CairoMakie. The problem is that when I try to do so, I get the error from the title:

ERROR: No backend available (GLMakie, CairoMakie, WGLMakie)!
Maybe you imported GLMakie but it didn’t build correctly.
In that case, try ]build GLMakie and watch out for any warnings.
If that’s not the case, make sure to explicitely import any of the mentioned backends.

Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] backend_display(#unused#::Missing, #unused#::AbstractPlotting.Scene)
@ AbstractPlotting ~.julia\packages\AbstractPlotting\M8Nlv\src\display.jl:42
[3] AbstractPlotting.VideoStream(scene::AbstractPlotting.Scene; framerate::Int64)
@ AbstractPlotting ~.julia\packages\AbstractPlotting\M8Nlv\src\display.jl:332
[4] AbstractPlotting.VideoStream(fig::AbstractPlotting.Figure; kw::Base.Iterators.Pairs{Symbol, Int64, Tuple{Symbol}, NamedTuple{(:framerate,), Tuple{Int64}}})
@ AbstractPlotting ~.julia\packages\AbstractPlotting\M8Nlv\src\display.jl:345
[5] Record(func::InteractiveDynamics.var"#62#65"{Int64, Int64, AgentBasedModel{ContinuousSpace{2, true, Float64, typeof(Agents.defvel)}, Agent, typeof(Agents.Schedulers.fastest), Dict{Symbol, Float64}, MersenneTwister}, typeof(agent_step!), typeof(model_step!), InteractiveDynamics.ABMStepper, Observable{Int64}}, scene::AbstractPlotting.Figure; framerate::Int64)
@ AbstractPlotting ~.julia\packages\AbstractPlotting\M8Nlv\src\display.jl:581
[6] record(func::Function, scene::AbstractPlotting.Figure, path::String; framerate::Int64, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ AbstractPlotting ~.julia\packages\AbstractPlotting\M8Nlv\src\display.jl:576
[7] abm_video(file::String, model::AgentBasedModel{ContinuousSpace{2, true, Float64, typeof(Agents.defvel)}, Agent, typeof(Agents.Schedulers.fastest), Dict{Symbol, Float64}, MersenneTwister}, agent_step!::typeof(agent_step!), model_step!::typeof(model_step!); spf::Int64, framerate::Int64, frames::Int64, resolution::Tuple{Int64, Int64}, title::String, showstep::Bool, axiskwargs::NamedTuple{(), Tuple{}}, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ InteractiveDynamics ~.julia\packages\InteractiveDynamics\BMtlp\src\agents\plots_videos.jl:198
[8] top-level scope
@ REPL[28]:1

I’ve tried ]build CairoMakie, but it didn’t help. I’ve also tried using the GLMakie backend but I get the same error. When calling ] status all packages are present. And all packages have been recently installed with ] add, so they should be the updated to the last available version. I’m on Windows 10, by the way. One thing to note is that in Pluto this works fine: calling abm_video correctly saves the file to disk. The error happens when using the Julia REPL directly. I’ve also noticed that both GLMakie and CairoMakie get precompiled when calling using GLMakie or using CairoMakie, not sure if it’s something useful to know or not.
What can I do to solve the issue?

3 Likes