1. .js_on_click() fires as expected
1. When script is generated with script = server_document(url="http://localhost:5006/bokeh_graph") the .on_click() event works
1. When I access the bokeh application directly at http://localhost:5006/bokeh_graph vs. embedded in my flask app the .on_click() event also triggers
It appears that the sever_session call is blocking the .on_click() event. Are server_sessions & these python event callbacks incompatible or am I calling the server session in an improper way which is causing the blocking?
Tho it appears you are closing the session, so I am not so sure. Since I am not sure, what would really be needed to investigate is a complete, minimal reproducer that can be run out of the box.
My button widget is not firing the .on_click() event when used with a server session. No errors are caught/displayed in browser, server or app.
Sever is run with:
bokeh serve bokeh_graph.py --port 5006 --log-level debug --allow-websocket-origin localhost:8000 --allow-websocket-origin localhost:5006
When a user first logs in I am creating them a specific session with:
bokeh_session = pull_session(url="http://localhost:5006/bokeh_graph"\)
bokeh_session.document.clear()
bokeh_session.document.add_root(new_layout)
session['bokeh_id'] = bokeh_session.id
bokeh_session.close()
That said, the following do work:
• .js_on_click() fires as expected
• When script is generated with script = server_document(url="http://localhost:5006/bokeh_graph"\) the .on_click() event works
• When I access the bokeh application directly at http://localhost:5006/bokeh_graph vs. embedded in my flask app the .on_click() event also triggers
It appears that the sever_session call is blocking the .on_click() event. Are server_sessions & these python event callbacks incompatible or am I calling the server session in an improper way which is causing the blocking?
I do think this issue is a bit different as I am closing the session. The crux actually appears to be something involved with clearing the document & adding a new root vs. the sever_session call.
I have attached a zip file which replicates my structure + problem.
Tho it appears you are closing the session, so I am not so sure. Since I am not sure, what would really be needed to investigate is a complete, minimal reproducer that can be run out of the box.
• When script is generated with script = server_document(url="[http://localhost:5006/bokeh_graph](http://localhost:5006/bokeh_graph)") the .on_click() event works
• When I access the bokeh application directly at [http://localhost:5006/bokeh_graph](http://localhost:5006/bokeh_graph) vs. embedded in my flask app the .on_click() event also triggers
It appears that the sever_session call is blocking the .on_click() event. Are server_sessions & these python event callbacks incompatible or am I calling the server session in an improper way which is causing the blocking?
–
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 [email protected].