-
Notifications
You must be signed in to change notification settings - Fork 35
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
PyObject not automatically converted to Julia type in Debugger #415
Comments
Reduced: julia> using JuliaInterpreter, PyCall
julia> np = pyimport("numpy");
julia> @interpret pytype_query(np.zeros)
ERROR: TypeError: in cglobal, expected Symbol, got a value of type JuliaInterpreter.SSAValue
Stacktrace:
[1] top-level scope
@ none:1
[2] eval
@ ./boot.jl:360 [inlined]
[3] maybe_evaluate_builtin(frame::Frame, call_expr::Expr, expand::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/builtins.jl:238
[4] evaluate_call_recurse!(recurse::Any, frame::Frame, call_expr::Expr; enter_generated::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:204
[5] evaluate_call_recurse!
@ ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:201 [inlined]
[6] eval_rhs(recurse::Any, frame::Frame, node::Expr)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:394
[7] step_expr!(recurse::Any, frame::Frame, node::Any, istoplevel::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:537
[8] step_expr!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:587
[9] finish!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/commands.jl:14
[10] finish_and_return!
@ ~/.julia/packages/JuliaInterpreter/pJs87/src/commands.jl:29 [inlined]
[11] evaluate_call_recurse!(recurse::Any, frame::Frame, call_expr::Expr; enter_generated::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:239
[12] evaluate_call_recurse!
@ ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:201 [inlined]
[13] eval_rhs(recurse::Any, frame::Frame, node::Expr)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:394
[14] step_expr!(recurse::Any, frame::Frame, node::Any, istoplevel::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:450
[15] step_expr!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:587
[16] finish!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/commands.jl:14
[17] finish_and_return!
@ ~/.julia/packages/JuliaInterpreter/pJs87/src/commands.jl:29 [inlined]
[18] evaluate_call_recurse!(recurse::Any, frame::Frame, call_expr::Expr; enter_generated::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:239
[19] evaluate_call_recurse!
@ ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:201 [inlined]
[20] eval_rhs(recurse::Any, frame::Frame, node::Expr)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:394
[21] step_expr!(recurse::Any, frame::Frame, node::Any, istoplevel::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:537
[22] step_expr!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/interpret.jl:587
[23] finish!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter ~/.julia/packages/JuliaInterpreter/pJs87/src/commands.jl:14
[24] finish_and_return!
@ ~/.julia/packages/JuliaInterpreter/pJs87/src/commands.jl:29 [inlined]
[25] finish_and_return!
@ ~/.julia/packages/JuliaInterpreter/pJs87/src/commands.jl:33 [inlined]
[26] top-level scope
@ ~/.julia/packages/JuliaInterpreter/pJs87/src/construct.jl:774 |
timholy
added a commit
that referenced
this issue
Dec 16, 2020
This supports SSAValue args for cglobal while also fixing a bug in which a GotoIfNot ended up going to the wrong statement. The latter was a consequence of incorrect :call unnesting. Fixes #455 Fixes #454 Fixes #415 Fixes JuliaDebug/Debugger.jl#275 Improves #354
timholy
added a commit
that referenced
this issue
Dec 17, 2020
This supports SSAValue args for cglobal while also fixing a bug in which a GotoIfNot ended up going to the wrong statement. The latter was a consequence of incorrect :call unnesting. Fixes #455 Fixes #454 Fixes #415 Fixes JuliaDebug/Debugger.jl#275 Improves #354
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm looking to debug Julia code that uses NumPy through PyCall. It turns out that
PyObject
s are not automatically converted to Julia types when debugging with Debugger.The same issue has been posted at JunoLab/Juno.jl#591.
To reproduce the issue, do the following in REPL
The text was updated successfully, but these errors were encountered: