Yes, the exact code I have posted produces the error in a fresh session.
‘DynamicalSystems.jl’ package is running successfully using ‘Julia v1.9’ in ‘VSCode’. Surprisingly the same code was running a few days back and giving the expected results but not today.
(@v1.9) pkg> status
Status `~/.julia/environments/v1.9/Project.toml`
[a6e380b2] ControlSystems v1.8.0
[864edb3b] DataStructures v0.18.15
⌃ [0c46a032] DifferentialEquations v7.2.0
⌃ [61744808] DynamicalSystems v3.0.0
⌃ [e9467ef8] GLMakie v0.7.4
[7073ff75] IJulia v1.24.2
⌅ [d1acc4aa] IntervalArithmetic v0.17.8
⌃ [138f1668] IntervalConstraintProgramming v0.9.1
⌅ [ee78f7c6] Makie v0.18.4
⌃ [961ee093] ModelingToolkit v8.3.1
⌃ [1dea7af3] OrdinaryDiffEq v6.11.2
[91a5bcdd] Plots v1.39.0
[c3e4b0f8] Pluto v0.19.27
⌃ [527681c1] ReversePropagation v0.1.3
⌅ [0c5d862f] Symbolics v4.14.0
[b4f28e30] TikzGraphs v1.4.0
[39424ebd] TreeView v0.5.0
[770da0de] UpdateJulia v0.4.2
[44cfe95a] Pkg v1.9.2
Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated`
After entering DynamicalSystems.interactive_trajectory, I am getting
UndefVarError: `interactive_trajectory` not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base ./Base.jl:31
[2] top-level scope
@ ~/Documents/Julia VS Code/GUI_DynamicalSystems.jl:43
Ah, you are indeed on an older version that does not include the visualization functions yet. Those were introduced with version 3.1 as far as I can tell. 3.2.1 is the current.
You really must have accidentally downgraded, which can happen if one keeps installing too many packages in one environment. It is generally discouraged to dump everything into the base environment. Instead it’s less error prone to use a new environment for every project, and only keep the bare necessities (Revise, BenchmarkTool, maybe Plots & Makie,…) in the base environment. See 4. Working with Environment · Pkg.jl and
Upgrade DynamicalSystems and it should work again. If you cannot, something is holding back the upgrade. Try ]add DynamicalSystems@3.2 for an error message then.