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

[BUG] Parameter hover_line_width throws attribute error for segment glyph #9197

Open
hklarner opened this issue Aug 28, 2019 · 1 comment
Open
Milestone

Comments

@hklarner
Copy link

software version info (bokeh, python, notebook, OS, browser, any other relevant packages)

  • bokeh 3.1.4
  • python3.6
  • ubuntu
  • chrome

Description of expected behavior and the observed behavior

I want to create a segment that changes its line width when hovered over. I use the parameter hover_line_width. I get an attribute error "unexpected attribute", see below.

Complete, minimal, self-contained example code that reproduces the issue

from bokeh.plotting import figure, output_file, save
from bokeh.models import HoverTool

p = figure()
r = p.segment(x0=[1,2], y0=[2,3], x1=[10,20], y1=[20,30], line_width=3, hover_line_width=6)
p.add_tools(HoverTool(renderers=[r]))

output_file("hover.html")
save(p)

Stack traceback and/or browser JavaScript console output

Traceback (most recent call last):
File "...", line 257, in
debug()
File "...", line 248, in debug
r = p.segment(x0=[1,2], y0=[2,3], x1=[10,20], y1=[20,30], line_width=3, hover_line_width=6)
File "fakesource", line 7, in segment
File "/usr/local/lib/python3.6/dist-packages/bokeh/plotting/helpers.py", line 857, in func
glyph = _make_glyph(glyphclass, kwargs, glyph_ca)
File "/usr/local/lib/python3.6/dist-packages/bokeh/plotting/helpers.py", line 398, in _make_glyph
return glyphclass(**kws)
File "/usr/local/lib/python3.6/dist-packages/bokeh/model.py", line 307, in init
super(Model, self).init(**kwargs)
File "/usr/local/lib/python3.6/dist-packages/bokeh/core/has_props.py", line 253, in init
setattr(self, name, value)
File "/usr/local/lib/python3.6/dist-packages/bokeh/core/has_props.py", line 288, in setattr
(name, self.class.name, text, nice_join(matches)))
AttributeError: unexpected attribute 'hover_line_width' to Segment, similar attributes are line_width

@bryevdv bryevdv added type: bug and removed TRIAGE labels Aug 31, 2019
@bryevdv bryevdv added this to the short-term milestone Aug 31, 2019
@bryevdv
Copy link
Member

bryevdv commented Aug 31, 2019

Thanks for the report @hklarner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants