aenarete / ControlPlots.jl

Easy to use plotting for control engineers and students
MIT License
2 stars 1 forks source link

PyPlot API change #9

Closed 1-Bart-1 closed 3 months ago

1-Bart-1 commented 3 months ago

I am getting the error:

julia> include("examples/reel_out_4p.jl") ERROR: LoadError: InitError: KeyError: key "get_cmap" not found Stacktrace: [1] getproperty @ ~/.julia/packages/PyCall/1gn3u/src/PyCall.jl:313 [inlined] [2] getproperty @ ~/.julia/packages/PyCall/1gn3u/src/PyCall.jl:317 [inlined] [3] init_colormaps() @ PyPlot ~/.julia/packages/PyPlot/2MlrT/src/colormaps.jl:57 [4] init() @ PyPlot ~/.julia/packages/PyPlot/2MlrT/src/init.jl:208 [5] run_module_init(mod::Module, i::Int64) @ Base ./loading.jl:1134 [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String) @ Base ./loading.jl:1122 [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}) @ Base ./loading.jl:1067 [8] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{…}) @ Base ./loading.jl:1481 [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128) @ Base ./loading.jl:1574 [10] _require(pkg::Base.PkgId, env::String) @ Base ./loading.jl:1938 [11] __require_prelocked(uuidkey::Base.PkgId, env::String) @ Base ./loading.jl:1812 [12] #invoke_in_world#3 @ ./essentials.jl:926 [inlined] [13] invoke_in_world @ ./essentials.jl:923 [inlined] [14] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base ./loading.jl:1803 [15] macro expansion @ ./loading.jl:1790 [inlined] [16] macro expansion @ ./lock.jl:267 [inlined] [17] require(into::Module, mod::Symbol) @ Base ./loading.jl:1753 [18] #invoke_in_world#3 @ ./essentials.jl:926 [inlined] [19] invoke_in_world @ ./essentials.jl:923 [inlined] [20] require(into::Module, mod::Symbol) @ Base ./loading.jl:1746 [21] include(fname::String) @ Base.MainInclude ./client.jl:489 [22] top-level scope @ REPL[5]:1 during initialization of module PyPlot in expression starting at /home/bart/Code/KiteModels.jl/examples/reel_out_4p.jl:29

I found this with a quick search: https://github.com/slimgroup/JUDI.jl/discussions/257

1-Bart-1 commented 3 months ago

The issue should be fixed with the updated version of pyplot?

1-Bart-1 commented 3 months ago

Issue seems to have disappeared now.

1-Bart-1 commented 3 months ago

Issue is solved by loading ControlPlots twice. Not optimal but works.