-
Notifications
You must be signed in to change notification settings - Fork 168
Display function fails with "LoadError: MethodError: no method matching nameof(::Bool)" #1281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This error is thrown when trying to display the result of julia> Symbolics.Term{Real}(true,(true,false))
Error showing value of type SymbolicUtils.BasicSymbolic{Real}:
ERROR: MethodError: no method matching nameof(::Bool)
The function `nameof` exists, but no method is defined for this combination of argument types.
Closest candidates are:
nameof(::Core.IntrinsicFunction)
@ Base reflection.jl:2273
nameof(::Num)
@ Symbolics ~/.julia/packages/Symbolics/VgGJx/src/num.jl:97
nameof(::Differential)
@ Symbolics ~/.julia/packages/Symbolics/VgGJx/src/diff.jl:58
...
Stacktrace:
[1] show_call(io::IOContext{Base.TTY}, f::Bool, args::Vector{Any})
@ SymbolicUtils ~/.julia/packages/SymbolicUtils/qsTQJ/src/types.jl:1078
[2] show_term(io::IOContext{Base.TTY}, t::SymbolicUtils.BasicSymbolic{Real})
@ SymbolicUtils ~/.julia/packages/SymbolicUtils/qsTQJ/src/types.jl:1123
[3] show
@ ~/.julia/packages/SymbolicUtils/qsTQJ/src/types.jl:1136 [inlined]
[4] show(io::IOContext{Base.TTY}, ::MIME{Symbol("text/plain")}, x::SymbolicUtils.BasicSymbolic{Real})
@ Base.Multimedia ./multimedia.jl:47
[5] (::REPL.var"#68#69"{REPL.REPLDisplay{REPL.LineEditREPL}, MIME{Symbol("text/plain")}, Base.RefValue{Any}})(io::Any)
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:367
[6] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:661
[7] display(d::REPL.REPLDisplay, mime::MIME{Symbol("text/plain")}, x::Any)
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:353
[8] display
@ ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:372 [inlined]
[9] display(x::Any)
@ Base.Multimedia ./multimedia.jl:340
[10] #invokelatest#2
@ ./essentials.jl:1055 [inlined]
[11] invokelatest
@ ./essentials.jl:1052 [inlined]
[12] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{…})
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:409
[13] (::REPL.var"#70#71"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:378
[14] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:661
[15] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:376
[16] (::REPL.var"#do_respond#96"{…})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1003
[17] #invokelatest#2
@ ./essentials.jl:1055 [inlined]
[18] invokelatest
@ ./essentials.jl:1052 [inlined]
[19] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
@ REPL.LineEdit ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2755
[20] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1474
[21] (::REPL.var"#75#81"{REPL.LineEditREPL, REPL.REPLBackendRef})()
@ REPL ~/.julia/juliaup/julia-1.11.4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:480
Some type information was truncated. Use `show(err)` to see complete types. Since the introduction of caching |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
To replicate this error, it is necessary to add some debug statements to the expand_derivatives function. In the below MWE, that function is modified from version 6.12.0 only by adding debug printing. It's about line 78 of the MWE, after the comment "#DEBUG PRINTING".
I was trying to debug #1262 and one of the intermediate variables fails to print. It has type "SymbolicUtils.BasicSymbolic{Real}". There might be two things going on
Here is the error output first; it includes a full dump() of the offending variable. I can't read it but hopefully someone can!
MWE:
The text was updated successfully, but these errors were encountered: