Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent pn.state.busy when throttling is enabled globally #6697

Closed
TheoMathurin opened this issue Apr 9, 2024 · 1 comment · Fixed by #6698
Closed

Inconsistent pn.state.busy when throttling is enabled globally #6697

TheoMathurin opened this issue Apr 9, 2024 · 1 comment · Fixed by #6698
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@TheoMathurin
Copy link
Contributor

ALL software version info

Panel 1.4.0
Bokeh 3.4.0
In a server

Description of expected behavior and the observed behavior

I expect pn.state.busy to reflect the actual state of the app. With Panel 1.4.0, if pn.config.throttled is set to True, the busy parameter will be True as soon as a slider is moved, even if it's not released, and stay True forever, including in new sessions for the remainder of the app life cycle.

Note that this does not happen if throttling is disabled globally and the function is bound to slider.param.value_throttled.

Complete, minimal, self-contained example code that reproduces the issue

import panel as pn

pn.extension(throttled=True)


def synced_spinner(value):
    return pn.indicators.LoadingSpinner(value=value)


slider = pn.widgets.IntSlider(name='Slider', start=0, end=1)
text = pn.bind(lambda x: f'Value of slider is {x}', slider)
spinner = pn.bind(synced_spinner, pn.state.param.busy)

pn.Row(pn.Column(slider, text), spinner).servable()

Stack traceback and/or browser JavaScript console output

No error in python or javascript

Screenshots or screencasts of the bug in action

busy_bug

@TheoMathurin TheoMathurin changed the title Inconsistent loading spinner state when throttling is enabled globally Inconsistent pn.state.busy when throttling is enabled globally Apr 9, 2024
@philippjfr
Copy link
Member

Strangely I was able to reproduce this once, and then never again.

@philippjfr philippjfr added this to the v1.4.1 milestone Apr 9, 2024
@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants