arnaudmiribel / streamlit-extras

Discover, try, install and share Streamlit re-usable bits we call "extras"!
https://extras.streamlit.app
Apache License 2.0
727 stars 124 forks source link

🐛 [BUG] - stateful_button out of sync with streamlit v1.13.0 #121

Closed emigre459 closed 1 year ago

emigre459 commented 1 year ago

Description

When trying to use stateful_button, I receive the error TypeError: gather_metrics() got an unexpected keyword argument 'name'. It appears that, at least as of streamlit 1.13.0 (if not earlier), streamlit.runtime.metrics_util.gather_metrics() no longer takes a name argument but is meant to only receive a callable.

Reproduction steps

1. Put `from streamlit_extras.stateful_button import button as stateful_button` at the top of a streamlit app.py file or equivalent.
2. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Version of streamlit

1.13.0

Version of streamlit-extras

0.2.5