Skip to content

broken on Julia 1.6? #520

@tbenst

Description

@tbenst

See below for something that works on 1.5, but not 1.6. Seems related to display...

I'm using PyPlot v2.9.0 on Ubuntu (over ssh).

❯ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.0 (2021-03-24)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using PyPlot
plt = 
julia> plt = PyPlot
PyPlot

julia> global fig, axes = plt.subplots(2,1)
ERROR: (in a Julia function called from Python)
JULIA: UndefVarError: _apply_latest not defined
Stacktrace:
  [1] getproperty
    @ ./Base.jl:26 [inlined]
  [2] _pyjlwrap_call(f::Function, args_::Ptr{PyCall.PyObject_struct}, kw_::Ptr{PyCall.PyObject_struct})
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/callback.jl:37
  [3] pyjlwrap_call(self_::Ptr{PyCall.PyObject_struct}, args_::Ptr{PyCall.PyObject_struct}, kw_::Ptr{PyCall.PyObject_struct})
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/callback.jl:49
  [4] macro expansion
    @ ~/.julia/packages/PyCall/BcTLp/src/exception.jl:95 [inlined]
  [5] #110
    @ ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:43 [inlined]
  [6] disable_sigint
    @ ./c.jl:458 [inlined]
  [7] __pycall!
    @ ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:42 [inlined]
  [8] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Int64, Int64}, nargs::Int64, kw::Ptr{Nothing})
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:29
  [9] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Int64, Int64}, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:11
 [10] pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::Int64, ::Vararg{Int64, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:83
 [11] pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::Int64, ::Vararg{Int64, N} where N)
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:83
 [12] subplots(::Int64, ::Vararg{Int64, N} where N; kws::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ PyPlot ~/.julia/packages/PyPlot/XHEG0/src/PyPlot.jl:177
 [13] subplots(::Int64, ::Vararg{Int64, N} where N)
    @ PyPlot ~/.julia/packages/PyPlot/XHEG0/src/PyPlot.jl:174
 [14] top-level scope
    @ REPL[2]:1
 [15] eval
    @ ./boot.jl:360 [inlined]
 [16] eval_user_input(ast::Any, backend::REPL.REPLBackend)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:139
 [17] repl_backend_loop(backend::REPL.REPLBackend)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:200
 [18] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:185
 [19] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:317
 [20] run_repl(repl::REPL.AbstractREPL, consumer::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:305
 [21] (::Base.var"#874#876"{Bool, Bool, Bool})(REPL::Module)
    @ Base ./client.jl:387
 [22] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [23] invokelatest
    @ ./essentials.jl:706 [inlined]
 [24] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
    @ Base ./client.jl:372
 [25] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:302
 [26] _start()
    @ Base ./client.jl:485
Stacktrace:
  [1] pyerr_check
    @ ~/.julia/packages/PyCall/BcTLp/src/exception.jl:62 [inlined]
  [2] pyerr_check
    @ ~/.julia/packages/PyCall/BcTLp/src/exception.jl:66 [inlined]
  [3] _handle_error(msg::String)
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/exception.jl:83
  [4] macro expansion
    @ ~/.julia/packages/PyCall/BcTLp/src/exception.jl:97 [inlined]
  [5] #110
    @ ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:43 [inlined]
  [6] disable_sigint
    @ ./c.jl:458 [inlined]
  [7] __pycall!
    @ ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:42 [inlined]
  [8] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Int64, Int64}, nargs::Int64, kw::Ptr{Nothing})
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:29
  [9] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Int64, Int64}, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:11
 [10] pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::Int64, ::Vararg{Int64, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:83
 [11] pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::Int64, ::Vararg{Int64, N} where N)
    @ PyCall ~/.julia/packages/PyCall/BcTLp/src/pyfncall.jl:83
 [12] subplots(::Int64, ::Vararg{Int64, N} where N; kws::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ PyPlot ~/.julia/packages/PyPlot/XHEG0/src/PyPlot.jl:177
 [13] subplots(::Int64, ::Vararg{Int64, N} where N)
    @ PyPlot ~/.julia/packages/PyPlot/XHEG0/src/PyPlot.jl:174
 [14] top-level scope
    @ REPL[2]:1

julia> 

❯ /opt/julia/julia-1.5.3/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.3 (2020-11-09)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using PyPlot

julia> plt = PyPlot
PyPlot

julia> global fig, axes = plt.subplots(2,1)
(Figure(PyObject <Figure size 1280x960 with 2 Axes>), PyCall.PyObject[PyObject <AxesSubplot:>, PyObject <AxesSubplot:>])

julia>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions