A few things to check/confirm quickly. If these do not uncover the problem, you’ll probably be asked to provide more information including a minimum reproducible example of what is not working.
Alternatively it is possible to trigger Python code to run when events happen, in the context of a Bokeh application running on a Bokeh server. This can accomplished by passing an event class, and a callback function to the the on_event() method. The callback should accept a single argument event , which will be passed the concrete event object that triggered the callback.
If you are running as a bokeh server and using a callback such as on_event(), what is the event you’ve registered with the callback and do you see the callback actually being invoked?