If the app tries to access input without importing it from shiny.express, it prints the following confusing error message:
RuntimeError: 'builtin_function_or_method' object has no attribute 'x'
Example app:
from shiny import reactive
from shiny.express import ui
# from shiny.express import input
ui.input_action_button("x", "Click me")
@reactive.Effect()
@reactive.event(input.x)
def foo():
print("Clicked button")
This is because input is a builtin function in Python, but it doesn't have an attribute named x. So although the error is correct, it is a bit confusing.
I think that while evaluating the code, we could inject a different object named input that will result in a better error message.