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

callback error in arrows data inspection #2764

Closed
HenriDeh opened this issue Mar 14, 2023 · 0 comments · Fixed by #3002
Closed

callback error in arrows data inspection #2764

HenriDeh opened this issue Mar 14, 2023 · 0 comments · Fixed by #3002

Comments

@HenriDeh
Copy link
Contributor

I get the following error when hover an arrow plotted with a DataInspector on the Figure.

Error in callback:
KeyError: key :indicator_visible not found
Stacktrace:
  [1] getindex(h::Dict{Symbol, Observable}, key::Symbol)
    @ Base .\dict.jl:498
  [2] getindex
    @ C:\Users\dehaybe\.julia\packages\MakieCore\LOKNz\src\attributes.jl:91 [inlined]
  [3] getproperty(x::Attributes, key::Symbol)
    @ MakieCore C:\Users\dehaybe\.julia\packages\MakieCore\LOKNz\src\attributes.jl:78
  [4] show_data(inspector::DataInspector, plot::Arrows{Tuple{Vector{Point{2, Float32}}, Vector{Point{2, Float32}}}}, idx::Int64, source::Nothing)
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:951
  [5] show_data
    @ C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:932 [inlined]
  [6] show_data_recursion(inspector::DataInspector, plot::Arrows{Tuple{Vector{Point{2, Float32}}, Vector{Point{2, Float32}}}}, idx::UInt32, source::LineSegments{Tuple{Base.ReinterpretArray{Point{2, Float32}, 1, Pair{Point{2, Float32}, Point{2, Float32}}, Vector{Pair{Point{2, Float32}, Point{2, Float32}}}, false}}})
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:436
  [7] show_data_recursion(inspector::DataInspector, plot::LineSegments{Tuple{Base.ReinterpretArray{Point{2, Float32}, 1, Pair{Point{2, Float32}, Point{2, Float32}}, Vector{Pair{Point{2, Float32}, Point{2, Float32}}}, false}}}, idx::UInt32)
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:404
  [8] on_hover(inspector::DataInspector)
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:382
  [9] (::Makie.var"#974#978"{DataInspector})(#unused#::Tuple{Float64, Float64})
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:355
 [10] #invokelatest#2
    @ .\essentials.jl:729 [inlined]
 [11] invokelatest
    @ .\essentials.jl:726 [inlined]
 [12] notify
    @ C:\Users\dehaybe\.julia\packages\Observables\PHGQ8\src\Observables.jl:169 [inlined]
 [13] setindex!
    @ C:\Users\dehaybe\.julia\packages\Observables\PHGQ8\src\Observables.jl:86 [inlined]
 [14] (::GLMakie.MousePositionUpdater)(#unused#::Nothing)
    @ GLMakie C:\Users\dehaybe\.julia\packages\GLMakie\N16Fq\src\events.jl:6
 [15] #invokelatest#2
    @ .\essentials.jl:729 [inlined]
 [16] invokelatest
    @ .\essentials.jl:726 [inlined]
 [17] notify
    @ C:\Users\dehaybe\.julia\packages\Observables\PHGQ8\src\Observables.jl:169 [inlined]
 [18] pollevents(screen::GLMakie.Screen{GLFW.Window})
    @ GLMakie C:\Users\dehaybe\.julia\packages\GLMakie\N16Fq\src\screen.jl:415
 [19] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
    @ GLMakie C:\Users\dehaybe\.julia\packages\GLMakie\N16Fq\src\screen.jl:844
 [20] renderloop(screen::GLMakie.Screen{GLFW.Window})
    @ GLMakie C:\Users\dehaybe\.julia\packages\GLMakie\N16Fq\src\screen.jl:868
 [21] (::GLMakie.var"#65#66"{GLMakie.Screen{GLFW.Window}})()
    @ GLMakie .\task.jl:484
Error in callback:
KeyError: key :indicator_visible not found
Stacktrace:
  [1] getindex(h::Dict{Symbol, Observable}, key::Symbol)
    @ Base .\dict.jl:498
  [2] getindex
    @ C:\Users\dehaybe\.julia\packages\MakieCore\LOKNz\src\attributes.jl:91 [inlined]
  [3] getproperty(x::Attributes, key::Symbol)
    @ MakieCore C:\Users\dehaybe\.julia\packages\MakieCore\LOKNz\src\attributes.jl:78
  [4] show_data(inspector::DataInspector, plot::Arrows{Tuple{Vector{Point{2, Float32}}, Vector{Point{2, Float32}}}}, idx::Int64, source::Nothing)
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:951
  [5] show_data
    @ C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:932 [inlined]
  [6] show_data_recursion(inspector::DataInspector, plot::Arrows{Tuple{Vector{Point{2, Float32}}, Vector{Point{2, Float32}}}}, idx::UInt32, source::LineSegments{Tuple{Base.ReinterpretArray{Point{2, Float32}, 1, Pair{Point{2, Float32}, Point{2, Float32}}, Vector{Pair{Point{2, Float32}, Point{2, Float32}}}, false}}})
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:436
  [7] show_data_recursion(inspector::DataInspector, plot::LineSegments{Tuple{Base.ReinterpretArray{Point{2, Float32}, 1, Pair{Point{2, Float32}, Point{2, Float32}}, Vector{Pair{Point{2, Float32}, Point{2, Float32}}}, false}}}, idx::UInt32)
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:404
  [8] on_hover(inspector::DataInspector)
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:382
  [9] (::Makie.var"#974#978"{DataInspector})(#unused#::Tuple{Float64, Float64})
    @ Makie C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:355
 [10] #invokelatest#2
    @ .\essentials.jl:729 [inlined]
 [11] invokelatest
    @ .\essentials.jl:726 [inlined]
 [12] notify
    @ C:\Users\dehaybe\.julia\packages\Observables\PHGQ8\src\Observables.jl:169 [inlined]
 [13] setindex!
    @ C:\Users\dehaybe\.julia\packages\Observables\PHGQ8\src\Observables.jl:86 [inlined]
 [14] (::GLMakie.MousePositionUpdater)(#unused#::Nothing)
    @ GLMakie C:\Users\dehaybe\.julia\packages\GLMakie\N16Fq\src\events.jl:6
 [15] #invokelatest#2
    @ .\essentials.jl:729 [inlined]
 [16] invokelatest
    @ .\essentials.jl:726 [inlined]
 [17] notify
    @ C:\Users\dehaybe\.julia\packages\Observables\PHGQ8\src\Observables.jl:169 [inlined]
 [18] pollevents(screen::GLMakie.Screen{GLFW.Window})
    @ GLMakie C:\Users\dehaybe\.julia\packages\GLMakie\N16Fq\src\screen.jl:415
 [19] on_demand_renderloop(screen::GLMakie.Screen{GLFW.Window})
    @ GLMakie C:\Users\dehaybe\.julia\packages\GLMakie\N16Fq\src\screen.jl:844
 [20] renderloop(screen::GLMakie.Screen{GLFW.Window})
    @ GLMakie C:\Users\dehaybe\.julia\packages\GLMakie\N16Fq\src\screen.jl:868
 [21] (::GLMakie.var"#65#66"{GLMakie.Screen{GLFW.Window}})()
    @ GLMakie .\task.jl:484

MWE:

julia> f,a,p = arrows([Point2f(0,1)], [Point2f(0,1)])

julia> DataInspector(f)
DataInspector(Scene (800px, 600px):
  1 Plot:
    └ Combined{Makie.tooltip, Tuple{Point{2, Float32}}}
  1 Child Scene:
    └ Scene (800px, 600px), Attributes with 10 entries:
  _color => RGBA{Float32}(0.0,0.0,0.0,0.0)
  depth => 9000.0
  enable_indicators => true
  enabled => true
  indicator_color => red
  indicator_linestyle => nothing
  indicator_linewidth => 2
  indicator_visible => false
  offset => 10.0
  range => 10, AbstractPlot[], Combined{Makie.tooltip, Tuple{Point{2, Float32}}}, Combined{Makie.tooltip, Tuple{Point{2, Float32}}}, Any[ObserverFunction defined at C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:355 operating on Observable((0.0, 0.0)), ObserverFunction defined at C:\Users\dehaybe\.julia\packages\Makie\gAmAB\src\interaction\inspector.jl:356 operating on Observable((0.0, 0.0))])

julia> f

Then hover the arrows. It does not work at first but after clicking away from the figure and back does it (if I got it right).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
1 participant