Skip to content
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

ERROR: TypeError: in specializations, expected DataType, got Type{Union{}} #573

Open
fredrikekre opened this issue May 5, 2023 · 1 comment

Comments

@fredrikekre
Copy link
Contributor

I don't have a MWE for this (yet), but I get the following error in the Debugger.

ERROR: TypeError: in specializations, expected DataType, got Type{Union{}}
Stacktrace:
  [1] specialize_method(method::Method, atype::Any, sparams::Core.SimpleVector; preexisting::Bool, compilesig::Bool)
    @ Core.Compiler ./compiler/utilities.jl:207
  [2] specialize_method
    @ ./compiler/utilities.jl:193 [inlined]
  [3] Base.StackTraces.StackFrame(frame::JuliaInterpreter.Frame)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/utils.jl:754
  [4] show_backtrace(io::IOContext{IOBuffer}, frame::JuliaInterpreter.Frame)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/utils.jl:774
  [5] showerror(io::IOContext{IOBuffer}, ex::TypeError, bt::JuliaInterpreter.Frame; backtrace::Bool)
    @ Base ./errorshow.jl:90
  [6] showerror
    @ ./errorshow.jl:86 [inlined]
  [7] display_error(io::IOContext{IOBuffer}, er::TypeError, frame::JuliaInterpreter.Frame)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/utils.jl:794
  [8] (::Debugger.var"#10#19"{REPL.LineEdit.Prompt, Debugger.DebuggerState})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Debugger ~/.julia/packages/Debugger/XLUtz/src/repl.jl:72

As a clue, the code I am debugging is broken, and in particular there is a MethodError thrown when running outside the Debugger.

@fredrikekre
Copy link
Contributor Author

This might be a better stacktrace (from @run instead of stepping):

ERROR: TypeError: in specializations, expected DataType, got Type{Union{}}
Stacktrace:
 [1] specialize_method(method::Method, atype::Any, sparams::Core.SimpleVector; preexisting::Bool, compilesig::Bool)
   @ Core.Compiler ./compiler/utilities.jl:207
 [2] specialize_method
   @ ./compiler/utilities.jl:193 [inlined]
 [3] Base.StackTraces.StackFrame(frame::JuliaInterpreter.Frame)
   @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/utils.jl:754
 [4] show_backtrace(io::IOContext{IOBuffer}, frame::JuliaInterpreter.Frame)
   @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/utils.jl:774
 [5] showerror(io::IOContext{IOBuffer}, ex::MethodError, bt::JuliaInterpreter.Frame; backtrace::Bool)
   @ Base ./errorshow.jl:90
 [6] showerror
   @ ./errorshow.jl:86 [inlined]
 [7] display_error(io::IOContext{IOBuffer}, er::MethodError, frame::JuliaInterpreter.Frame)
   @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/utils.jl:794
 [8] RunDebugger(frame::JuliaInterpreter.Frame, repl::Nothing, terminal::Nothing; initial_continue::Bool)
   @ Debugger ~/.julia/packages/Debugger/XLUtz/src/repl.jl:157
 [9] top-level scope
   @ ~/.julia/packages/Debugger/XLUtz/src/Debugger.jl:137

caused by: MethodError: Cannot `convert` an object of type
  Tensor{2,2,Float64{},4} to an object of type
  Tensor{1,2,Float64{},2}
Stacktrace:
  [1] prepare_call(f::Any, allargs::Vector{Any}; enter_generated::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/construct.jl:250
  [2] get_call_framecode(fargs::Vector{Any}, parentframe::JuliaInterpreter.FrameCode, idx::Int64; enter_generated::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/localmethtable.jl:63
  [3] evaluate_call_recurse!(recurse::Any, frame::JuliaInterpreter.Frame, call_expr::Expr; enter_generated::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/interpret.jl:245
  [4] evaluate_call_recurse!
    @ ~/.julia/packages/JuliaInterpreter/ktCFr/src/interpret.jl:220 [inlined]
  [5] eval_rhs(recurse::Any, frame::JuliaInterpreter.Frame, node::Expr)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/interpret.jl:393
  [6] step_expr!(recurse::Any, frame::JuliaInterpreter.Frame, node::Any, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/interpret.jl:546
  [7] step_expr!(recurse::Any, frame::JuliaInterpreter.Frame, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/interpret.jl:596
  [8] finish!(recurse::Any, frame::JuliaInterpreter.Frame, istoplevel::Bool)
    @ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/ktCFr/src/commands.jl:14
  [9] finish_and_return!(recurse::Any, frame::JuliaInterpreter.Frame, istoplevel::Bool)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant