The following method of script launching apps worked prior to 0.12.6.
Is this no longer acceptable?
#init server
os.system(‘bokeh serve’)
‘’’
app code
‘’’
#setup and push worksheet
curdoc().add_root(make_layout())
session = push_session(curdoc())
session.show()
if name == “main”:
session.loop_until_closed()
``
Error:
File “C:\Anaconda3\lib\site-packages\bokeh\client_connection.py”, line 231, in push_doc
raise RuntimeError("Failed to push document: " + reply.content[‘text’])
RuntimeError: Failed to push document: KeyError(“View model name ‘LinearScale’ not found”,)
Here is a complete example. Again, works with 0.12.5, does not with 0.12.6
from bokeh.client import push_session
from bokeh.io import curdoc
from bokeh.plotting import figure
from bokeh.layouts import layout
from numpy import arange, sin, cos
import os
#setup server and push worksheet
curdoc().add_root(make_layout())
session = push_session(curdoc())
session.show()
if name == “main”:
session.loop_until_closed()
You have some sort of version mismatch (your code works fine for me). My best guess is that you are executing your script with Bokeh 0.12.6, but that the server you are connecting to is still Bokeh 0.12.5 or earlier.
Here is a complete example. Again, works with 0.12.5, does not with 0.12.6
from bokeh.client import push_session
from bokeh.io import curdoc
from bokeh.plotting import figure
from bokeh.layouts import layout
from numpy import arange, sin, cos
import os
#setup server and push worksheet
curdoc().add_root(make_layout())
session = push_session(curdoc())
session.show()
if __name__ == "__main__":
session.loop_until_closed()