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

Cryptic error message when using PairPlots without Makie backend loaded #15

Open
pankgeorg opened this issue Mar 23, 2023 · 6 comments
Open

Comments

@pankgeorg
Copy link

image

I believe there is an issue in the show method:

image

stacktrace
getproperty(::Missing, ::Symbol)@Base.jl:37
var"#getscreen#1013"(::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(Makie.getscreen), ::Missing, ::Makie.Scene, ::IOContext{IOBuffer}, ::Vararg{Any})@display.jl:326
getscreen(::Missing, ::Makie.Scene, ::IOContext{IOBuffer}, ::Vararg{Any})@display.jl:324
show(::IOContext{IOBuffer}, ::MIME{Symbol("image/svg+xml")}, ::Makie.Figure)@display.jl:203
var"#show#6"(::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, ::typeof(show), ::IOContext{IOBuffer}, ::MIME{Symbol("image/svg+xml")}, ::DisplayAs.Showable{MIME{Symbol("image/svg+xml")}})@DisplayAs.jl:82
show(::IOContext{IOBuffer}, ::MIME{Symbol("image/svg+xml")}, ::DisplayAs.Showable{MIME{Symbol("image/svg+xml")}})@DisplayAs.jl:82
show_richest(::IOContext{IOBuffer}, ::Any)@PlutoRunner.jl:1170
[email protected]:1095[inlined]
format_output_default(::Any, ::Any)@PlutoRunner.jl:995
#format_output#[email protected]:1012[inlined]
#[email protected]:904[inlined]
var"#with_io_to_logs#115"(::Bool, ::Base.CoreLogging.LogLevel, ::typeof(Main.PlutoRunner.with_io_to_logs), ::Main.PlutoRunner.var"#53#56"{Module, DisplayAs.Showable{MIME{Symbol("image/svg+xml")}}, Dict{Tuple{UInt64, Int64}, Int64}})@PlutoRunner.jl:2386
(::Main.PlutoRunner.var"#119#120"{Bool, Base.CoreLogging.LogLevel, Main.PlutoRunner.var"#53#56"{Module, DisplayAs.Showable{MIME{Symbol("image/svg+xml")}}, Dict{Tuple{UInt64, Int64}, Int64}}})()@PlutoRunner.jl:2410
with_logstate(::Function, ::Any)@logging.jl:514
[email protected]:626[inlined]
#with_logger_and_io_to_logs#[email protected]:2409[inlined]
var"#formatted_result_of#50"(::Bool, ::typeof(Main.PlutoRunner.formatted_result_of), ::Base.UUID, ::Base.UUID, ::Bool, ::Vector{String}, ::Nothing, ::Module)@PlutoRunner.jl:903
kwcall(::NamedTuple{(:capture_stdout,), Tuple{Bool}}, ::typeof(Main.PlutoRunner.formatted_result_of), ::Base.UUID, ::Base.UUID, ::Bool, ::Vector{String}, ::Nothing, ::Module)@PlutoRunner.jl:877
top-level [email protected]:527
`pairplot(randn(3,3)) |> DisplayAs.SVG`

PairPlots.jl v1.0.0
DisplayAs v0.1.6
Pluto v0.19.19

@sefffal
Copy link
Owner

sefffal commented Mar 23, 2023

Thanks for the report.
Just to confirm, did you load a Makie backend? (Eg CairoMakie)

@pankgeorg
Copy link
Author

That explains it!

Ref this Pluto PR

I'll test with CairoMakie

@sefffal sefffal changed the title PairPlots don't work in Pluto Cryptic error message when using PairPlots without Makie backend loaded Mar 23, 2023
@pankgeorg
Copy link
Author

I can make it work if I do using CairoMakie, Makie before using PairPlots, so I'll close this. Thanks!

@sefffal
Copy link
Owner

sefffal commented Mar 23, 2023

Thanks @pankgeorg. I'm going to leave this open for now as the error message should be improved.

@sefffal sefffal reopened this Mar 23, 2023
@sefffal
Copy link
Owner

sefffal commented Mar 26, 2023

I just tested this in a terminal and I get a pretty good error message from Makie itself:

julia> pairplot(t)
Error showing value of type Makie.Figure:
ERROR: No backend available!
Make sure to also `import/using` a backend (GLMakie, CairoMakie, WGLMakie).

If you imported GLMakie, it may have not built correctly.
In that case, try `]build GLMakie` and watch out for any warnings.

Stacktrace:
   [1-9]  internal
       @ Base, Makie, AbbreviatedStackTraces, REPL, Unknown
    [10] (::REPL.var"#do_respond#80"{Bool, Bool, })(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
       @ REPL ~/julia/usr/share/julia/stdlib/v1.9/REPL/src/REPL.jl:897
    [11] (::VSCodeServer.var"#98#101"{REPL.var"#do_respond#80"{Bool, Bool, }})(mi::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
       @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.45.1/scripts/packages/VSCodeServer/src/repl.jl:122
 [12-15]  internal
       @ REPL.LineEdit, REPL, Unknown
Use `err` to retrieve the full stack trace.

When you used PairPlot by itself (not with DisplayAs) was there an error message? Or did it just print Figure()?

@pankgeorg
Copy link
Author

It just printed Figure()

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

2 participants