Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Fixed `ui.tooltip()`'s `options` parameter to properly pass Bootstrap tooltip options to the underlying web component. (#2101)

* Fixed an issue where `session.bookmark()` would error when non-existent `input` values are read. (#2117)

* Revised `accordion()`'s `open` logic to close all panels when an empty list is passed. (#2109)

## [1.5.0] - 2025-09-11
Expand Down
6 changes: 5 additions & 1 deletion shiny/session/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,11 @@ async def _serialize(
continue
if key in exclude_set:
continue
val = value()

try:
val = value()
except SilentException:
continue

# Possibly apply custom serialization given the input id
serializer = self._serializers.get(key, serializer_default)
Expand Down
9 changes: 8 additions & 1 deletion tests/playwright/shiny/bookmark/modal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ def app_ui(request: Request):
)


def server(input: Inputs, ouput: Outputs, session: Session):
def server(input: Inputs, output: Outputs, session: Session):

@reactive.effect
@reactive.event(input.letter, ignore_init=True)
async def _():
await session.bookmark()

# Just to make sure that missing inputs don't break bookmarking
# behavior (https://github.com/posit-dev/py-shiny/pull/2117)
@reactive.effect
@reactive.event(input.non_existent_input)
def _():
pass


app = App(app_ui, server, bookmark_store="url")
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ def test_bookmark_modules(page: Page, local_app: ShinyAppProc):
)

assert "?" not in page.url
assert "An error has occurred" not in page.inner_text("body")
Loading