Widget updates appear blocked by python until process in complete in deployed app

Hi there! I have a text status bar that I’d like to update during a long compute. If I view the app in Jupyter, the updates to the status bar happen as python progresses through the code. If I deploy that app, the updates are blocked and are not visible until the python process is complete. I’m trying to understand why.

Here is a reproducible example:

import panel as pn
import param
import time


class TestPanel(param.Parameterized):

    def __init__(self, **params):
        self.status_text = pn.widgets.StaticText(name='Status', value='Click "Evaluate"')
        self.evaluate_button = pn.widgets.Button(name='Evaluate', button_type='warning')

    def run_evaluate(self, event=None):
        self.status_text.value = 'start'
        self.status_text.value = 'continuing'
        self.status_text.value = 'end'

    def panel(self):
        return pn.Column(self.status_text, self.evaluate_button)
app = TestPanel()

Any ideas what is happening or what I can do to fix it?

I can’t seem to reproduce; what version of Panel do you have?

Panel 1.4.1

I’m deploying it through a new JupyterHub App Launcher that we’ve been developing. Its possible that there are some settings there that are causing this. These are the args we’re using:


Can you see if you can reproduce locally on your machine (or another machine)?

Confirmed that I don’t see this behavior on my local machine with panel serve .... Apologies for the distraction! I will continue the investigation with the specific way we are deploying. Thank you @ahuang11 !

1 Like

No worries. Thanks for sharing!

Interesting… just realized that using the “Panel Preview” button in Jupyter also gives the same blocking behavior. I admittedly don’t know what where that button is managed to go check out what commands its running.