Python - Bokeh Interactive Legend - Attribute Error

Viewed 2942

I am trying to make an interactive legend.

Even when I run the code in this link https://docs.bokeh.org/en/latest/docs/user_guide/interaction/legends.html

I get the error:

AttributeError: unexpected attribute 'legend_label' to Line, possible attributes are js_event_callbacks, js_property_callbacks, line_alpha, line_cap, line_color, line_dash, line_dash_offset, line_join, line_width, name, subscribed_events, tags, x or y

Any ideas why? I have the latest version of Bokeh, as far I know.

3 Answers

Use legend instead of legend_field or legend_label.

I got a similar error when installing bokeh through the shell first and through the conda later. This got me with two versions and the old one was preferred. I think what solved it for me: uninstalling previous versions, installing only conda (I have done it in Jupyter Notebook) and restarting the computer afterwards. Hope it helps.

Related