Open cnrrobertson opened 2 years ago
I aplogize, I should have included the full stacktrace. It seems like this is actually just a display error from ModelingToolkit.
Stacktrace:
[1] macro expansion
@ ~/.julia/packages/ModelingToolkit/FqHcR/src/systems/abstractsystem.jl:0 [inlined]
[2] setproperties(obj::Basis, patch::NamedTuple{(:systems,), Tuple{Vector{Union{}}}})
@ ModelingToolkit ~/.julia/packages/ModelingToolkit/FqHcR/src/systems/abstractsystem.jl:266
[3] set
@ ~/.julia/packages/Setfield/AS2xF/src/lens.jl:122 [inlined]
[4] macro expansion
@ ~/.julia/packages/Setfield/AS2xF/src/sugar.jl:197 [inlined]
[5] generate_connection_set!(connectionsets::Vector{ModelingToolkit.ConnectionSet}, sys::Basis, namespace::Nothing)
@ ModelingToolkit ~/.julia/packages/ModelingToolkit/FqHcR/src/systems/connectors.jl:225
[6] generate_connection_set!
@ ~/.julia/packages/ModelingToolkit/FqHcR/src/systems/connectors.jl:195 [inlined]
[7] generate_connection_set
@ ~/.julia/packages/ModelingToolkit/FqHcR/src/systems/connectors.jl:190 [inlined]
[8] n_extra_equations(sys::Basis)
@ ModelingToolkit ~/.julia/packages/ModelingToolkit/FqHcR/src/systems/abstractsystem.jl:714
[9] show(io::IOContext{Base.TTY}, #unused#::MIME{Symbol("text/plain")}, sys::Basis)
@ ModelingToolkit ~/.julia/packages/ModelingToolkit/FqHcR/src/systems/abstractsystem.jl:746
[10] (::REPL.var"#43#44"{REPL.REPLDisplay{REPL.LineEditREPL}, MIME{Symbol("text/plain")}, Base.RefValue{Any}})(io::Any)
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:266
[11] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:510
[12] display(d::REPL.REPLDisplay, mime::MIME{Symbol("text/plain")}, x::Any)
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:259
[13] display(d::REPL.REPLDisplay, x::Any)
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:271
[14] display(x::Any)
@ Base.Multimedia ./multimedia.jl:328
[15] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[16] invokelatest
@ ./essentials.jl:714 [inlined]
[17] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:293
[18] (::REPL.var"#45#46"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:277
[19] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:510
[20] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:275
[21] (::REPL.var"#do_respond#66"{Bool, Bool, REPL.var"#77#87"{REPL.LineEditREPL, REPL.REPLH
ok::Bool)
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:846
[22] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[23] invokelatest
@ ./essentials.jl:714 [inlined]
[24] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface,
@ REPL.LineEdit ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/LineEdit.jl
[25] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
@ REPL ~/packages/julias/julia-1.7/share/julia/stdlib/v1.7/REPL/src/REPL.jl:1232
[26] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()
@ REPL ./task.jl:423
The basis is created, but doesn't display in the REPL. The MethodError threw me off. It displays fine with print(Ψ)
@YingboMa might this be the connection set printing?
Got the same error. Even the Getting Started example (https://datadriven.sciml.ai/stable/examples/0_getting_started/) doesn't work. I also tried several other examples that use Basis
(not necessarily SINDy), none worked due to the same error. My temporary solution is to implement SINDy from scratch, solved by Gurobi.
I didn't realize that the basis was created successfully, it's just its displaying in the REPL. So it works; the displaying error is annoying but harmless (I think).
Trying to construct a basis for nonlinear time continuous system and getting a method error. Most easily reproduced by following the basis creation in the example:
gives me:
I've never had this issue before but its been a while since I've tried. Julia 1.7.2