This worked fine on ubuntu 14. Computer died, ported to new ubuntu 16. Same code still works fine when rendering a gridplot without legend instead.
Error:
Bokeh Error
Module `LegendItem' does not exists. The problem may be two fold. Either a model was requested that's available in an extra bundle, e.g. a widget, or a custom model was requested, but it wasn't registered before first usage.
python:
if plot == ‘multi’:
p = figure(x_axis_type=“datetime”,plot_width=1000, plot_height=800, title=title)
p.grid.grid_line_alpha = 0.5
p.xaxis.axis_label = ‘Date (m-d)’
p.yaxis.axis_label = ‘Number of calls per day’
p.ygrid.band_fill_color = “olive”
p.ygrid.band_fill_alpha = 0.1
for k,v in unstacked.items():
if k in agencyList:
p.line(x=unstacked[‘Date’].tolist(), y=unstacked[k].tolist(), color=agencydict[k], legend=k)
#p.line(x, y, color=‘navy’)
#p.circle(x, y, color=‘navy’)
#p = TimeSeries(unstacked, x_mapper_type=‘datetime’, xlabel=‘Date’, legend=True, title=title, ylabel=‘Number of calls per day’)
script, div = components(p)
return render_template(‘graph.html’, script=script, div=div)
``
in graph.html:
{% extends “base.html” %}
{% block title %} plot {% endblock %}
{% block head %}
{{ script | safe }}
{% endblock %}
{% block content %}
``

