I am receiving a strange error with the following code:
from bokeh.plotting import output_file, show, curdoc, figure
from bokeh.models import ColumnDataSource as CDS
start, end = datetime(2018,3,16), datetime(2018,3,16,23,59)
class Chart:
def __init__(self):
self.prices = CDS()
def make_one_data(self):
dts = [Timestamp('2017-01-01'), Timestamp('2017-01-02'), Timestamp('2017-01-03')]
cls = [5,60,15]
self.prices.data = dict(datetime = dts, close = cls)
def init_chart(self):
self.chart=figure(x_axis_type="datetime",plot_width=900, height=200)
self.chart.xaxis[0].ticker.desired_num_ticks=24
def chart_line(self):
self.chart.line("datetime", "close", source = self.prices)
def make_one_chart(self):
self.init_chart()
self.chart_line()
def test_Chart():
chart = Chart()
chart.make_one_data()
chart.make_one_chart()
return chart
``
chart = test_Chart()
show(chart.chart)
``
This still show the plot in an html windows, but I can see an error message E-1001 (BAD_COLUMN_NAME): Glyph refers to nonexistent column name: close, datetime [renderer: GlyphRenderer(id='36333382-dbaa-455e-be05-0e8b97e3f554', ...)]
showing in the terminal
I have tried to isolate the problem but I am getting very confused.
Can anyone help me get rid of that error message?
Thanks a lot!
Vincent