Hi, currently learning Julia and the Agents.jl library. So far, I’ve managed to reproduce other examples in the package tutorials, so I guess it has nothing to do with versions(?).
The code is taken from Zombie Outbreak in a City · Agents.jl
and the zombie outbreak is throwing the following error (I think at the visualization part? because I can step the model forward, just can’t seem to get the nice plot in the example)
Thanks for any hints as to what might be going on.
If is of any help, after trying to update Julia, I get that there were 2 direct dependencies failing to precompile: AgentsGraphVisualizations and AgentsOSMVisualizations. I think these are also responsible for the error:
{
“name”: “LoadError”,
“message”: "MethodError: no method matching agents_space_dimensionality(::Agents.OSM.OpenStreetMapSpace)
The function agents_space_dimensionality
exists, but no method is defined for this combination of argument types.
Closest candidates are:
agents_space_dimensionality(::Nothing)
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/spaces/nothing.jl:5
agents_space_dimensionality(::AgentBasedModel{Nothing})
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/spaces/nothing.jl:3
agents_space_dimensionality(::AgentBasedModel)
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/spaces/abstract.jl:1
…
",
“stack”: "MethodError: no method matching agents_space_dimensionality(::Agents.OSM.OpenStreetMapSpace)
The function agents_space_dimensionality
exists, but no method is defined for this combination of argument types.
Closest candidates are:
agents_space_dimensionality(::Nothing)
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/spaces/nothing.jl:5
agents_space_dimensionality(::AgentBasedModel{Nothing})
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/spaces/nothing.jl:3
agents_space_dimensionality(::AgentBasedModel)
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/spaces/abstract.jl:1
…
Stacktrace:
[1] agents_space_dimensionality(model::StandardABM{Agents.OSM.OpenStreetMapSpace, Zombie, Dict{Int64, Zombie}, Tuple{DataType}, typeof(zombie_step!), typeof(dummystep), typeof(Agents.Schedulers.fastest), Dict{Symbol, Float64}, MersenneTwister})
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/spaces/abstract.jl:1
[2] axistype(model::StandardABM{Agents.OSM.OpenStreetMapSpace, Zombie, Dict{Int64, Zombie}, Tuple{DataType}, typeof(zombie_step!), typeof(dummystep), typeof(Agents.Schedulers.fastest), Dict{Symbol, Float64}, MersenneTwister})
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/abmplot.jl:15
[3] abmplot(model::StandardABM{Agents.OSM.OpenStreetMapSpace, Zombie, Dict{Int64, Zombie}, Tuple{DataType}, typeof(zombie_step!), typeof(dummystep), typeof(Agents.Schedulers.fastest), Dict{Symbol, Float64}, MersenneTwister}; figure::@NamedTuple{size::Tuple{Int64, Int64}}, axis::@NamedTuple{title::Observable{String}, titlealign::Symbol}, warn_deprecation::Bool, kwargs::@Kwargs{add_controls::Bool, agent_color::typeof(zombie_color), agent_size::typeof(zombie_size)})
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/abmplot.jl:8
[4] abmvideo(file::String, model::StandardABM{Agents.OSM.OpenStreetMapSpace, Zombie, Dict{Int64, Zombie}, Tuple{DataType}, typeof(zombie_step!), typeof(dummystep), typeof(Agents.Schedulers.fastest), Dict{Symbol, Float64}, MersenneTwister}; spf::Nothing, dt::Int64, framerate::Int64, frames::Int64, title::String, showstep::Bool, figure::@NamedTuple{size::Tuple{Int64, Int64}}, axis::@NamedTuple{}, recordkwargs::@NamedTuple{compression::Int64}, kwargs::@Kwargs{agent_color::typeof(zombie_color), agent_size::typeof(zombie_size)})
@ AgentsVisualizations ~/.julia/packages/Agents/dTr7O/ext/AgentsVisualizations/src/convenience.jl:115
[5] top-level scope
@ In[7]:6"
}