-
Notifications
You must be signed in to change notification settings - Fork 83
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
Updating express inputs leads to an error #1034
Comments
This is a real issue, but I will note that in practice, most uses will only call the from shiny import reactive
from shiny.express import input, ui
ui.input_slider("m", "M", 1, 100, 10)
ui.input_slider("n", "N", 1, 100, 50)
@reactive.effect
@reactive.event(input.m)
def _():
ui.update_slider("n", value=input.m()) |
That's true, but it's also not great that if you try use any from shiny import reactive
from shiny.express import session
@reactive.effect
async def _():
await session.send_custom_message("msg", {}) Error in Effect: '_MockSession' object has no attribute 'send_custom_message' You also can't avoid the error with something like |
I think it's extremely important that |
I see now that MockSession doesn't have |
Just to elaborate a bit on what @jcheng5 said about it being important that |
A problem with calling So I think we may need to change |
Consider the following app, which from a user perspective is functional, but does generate an error (since the 1st time it runs a session hasn't been established):
The text was updated successfully, but these errors were encountered: