☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

push_session issue with 0.12.6

Community Support
Rick
Rick

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”,)

``

⌁   Link to post
Rick
Rick

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

os.system(‘bokeh serve’)
def make_plot():
“”“build up data plot
“””
x = arange(0, 10, .1)
y1 = sin(x)
y2 = cos(x)
fig1 = figure(title=‘sin’, plot_width=500, plot_height=200)
fig1.line(x, y1)
fig2 = figure(title=‘cos’, plot_width=500, plot_height=200)
fig2.line(x, y2)
return fig1, fig2

def make_layout():
“”“main worksheet layout
“””
fig1,fig2 = make_plot()
#set overall layout
worksheet = layout([[fig1],[fig2]])
return worksheet

#setup server and push worksheet
curdoc().add_root(make_layout())
session = push_session(curdoc())
session.show()
if name == “main”:
session.loop_until_closed()

``

⌁   Link to post
Bryan
Bryan

Hi,

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.

Thanks,

Bryan

···

On Jun 28, 2017, at 15:46, rick <ricksandusky@gmail.com> wrote:

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

os.system('bokeh serve')
def make_plot():
    """build up data plot
    """
    x = arange(0, 10, .1)
    y1 = sin(x)
    y2 = cos(x)
    fig1 = figure(title='sin', plot_width=500, plot_height=200)
    fig1.line(x, y1)
    fig2 = figure(title='cos', plot_width=500, plot_height=200)
    fig2.line(x, y2)
    return fig1, fig2

def make_layout():
    """main worksheet layout
    """
    fig1,fig2 = make_plot()
    #set overall layout
    worksheet = layout([[fig1],[fig2]])
    return worksheet

#setup server and push worksheet
curdoc().add_root(make_layout())
session = push_session(curdoc())
session.show()
if __name__ == "__main__":
    session.loop_until_closed()

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/21782ded-ae7a-4068-be35-51381f1a1c2a%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled