panel
panel copied to clipboard
Busy spinner stays even when script is idle
ALL software version info
Python: 3.12.2 Panel: 1.4.1 Bokeh: 3.4.0 OS: Fedora 40 Silverblue (beta) Browser: Firefox 124.0.1
Description of expected behavior and the observed behavior
I run a script with a callback function that triggers after a button is clicked, and I've programatically added a button click at the end of the script. The callback function displays a busy spinner, and when I run the script using panel serve
I get a never-ending busy spinner. This happens on panel version 1.4.1 and 1.4.0, but not 1.3.8.
Expected behaviour would be that the busy spinner would disappear once the callback function has finished running.
Complete, minimal, self-contained example code that reproduces the issue
mport panel as pn
import time
pn.extension(loading_spinner='dots', loading_color='#696969')
button = pn.widgets.Button(name='Click me', button_type='primary', sizing_mode='stretch_both')
def callback(event):
with pn.param.set_values(row, loading=True):
time.sleep(1)
button.on_click(callback)
row = pn.Row(button).servable()
button.clicks += 1
Stack traceback and/or browser JavaScript console output
Screenshots or screencasts of the bug in action
Another thing that I want to add is that I was able to trigger this 70% of the time when I refreshed the page 20 times just now.