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 showing value of type Plots.Plot{Plots.GRBackend} #121

Closed
sjkobayashi opened this issue May 5, 2023 · 3 comments
Closed

Error showing value of type Plots.Plot{Plots.GRBackend} #121

sjkobayashi opened this issue May 5, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@sjkobayashi
Copy link

With the latest version of julia-snail and julia-snail-multimedia-enable set to t, I get an error when I try to use Plots.plot.

For example, running using Plots; plot(sin, 0, 2π) gives

Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: "No client connections available"
Stacktrace:
  [1] send_to_client(expr::String, client_socket::Nothing)
    @ Main.JuliaSnail ~/.emacs.d/elpa/julia-snail-20230503.522/JuliaSnail.jl:932
  [2] send_to_client
    @ ~/.emacs.d/elpa/julia-snail-20230503.522/JuliaSnail.jl:930 [inlined]
  [3] send
    @ ~/.emacs.d/elpa/julia-snail-20230503.522/JuliaSnail.jl:750 [inlined]
  [4] display(d::Main.JuliaSnail.Multimedia.EmacsDisplay, #unused#::MIME{Symbol("image/png")}, img_raw::Plots.Plot{Plots.GRBackend})
    @ Main.JuliaSnail.Multimedia ~/.emacs.d/elpa/julia-snail-20230503.522/JuliaSnail.jl:754
  [5] display(d::Main.JuliaSnail.Multimedia.EmacsDisplay, mime::String, x::Any)
    @ Base.Multimedia ./multimedia.jl:216
  [6] display(d::Main.JuliaSnail.Multimedia.EmacsDisplay, img::Plots.Plot{Plots.GRBackend})
    @ Main.JuliaSnail.Multimedia ~/.emacs.d/elpa/julia-snail-20230503.522/JuliaSnail.jl:765
  [7] display(x::Any)
    @ Base.Multimedia ./multimedia.jl:328
  [8] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
  [9] invokelatest
    @ ./essentials.jl:726 [inlined]
 [10] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL /usr/local/Cellar/julia/1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:296
 [11] (::REPL.var"#45#46"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL /usr/local/Cellar/julia/1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:278
 [12] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL /usr/local/Cellar/julia/1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:521
 [13] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL /usr/local/Cellar/julia/1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:276
 [14] (::REPL.var"#do_respond#66"{Bool, Bool, REPL.var"#77#87"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL /usr/local/Cellar/julia/1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:857
 [15] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
 [16] invokelatest
    @ ./essentials.jl:726 [inlined]
 [17] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit /usr/local/Cellar/julia/1.8.5/share/julia/stdlib/v1.8/REPL/src/LineEdit.jl:2510
 [18] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL /usr/local/Cellar/julia/1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:1248
 [19] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:484

If julia-snail-multimedia-enable set to nil, the plot works normally by showing a dedicated window.

@danielmatz
Copy link
Contributor

I'm seeing the same thing with CairoMakie. I'm on Julia 1.8.4.

@gcv
Copy link
Owner

gcv commented May 8, 2023

Sorry about that. Should be fixed in 679498c.

@gcv gcv added the bug Something isn't working label May 8, 2023
@sjkobayashi
Copy link
Author

Thank you! It works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants