mkhorasani / Streamlit-Authenticator

A secure authentication module to manage user access in a Streamlit application.
Other
1.66k stars 258 forks source link

DuplicateWidgetID: There are multiple identical st.button widgets with the same generated key. #17

Closed jitvimol closed 2 years ago

jitvimol commented 2 years ago

When following and try running code from github. Everything function except there's an error of streamlit.

My Analysis and solution: st.button widget required assigned "different" keyname and the backend code use the same keyname, resulting in an error.

error msg from cli: ''' streamlit.errors.DuplicateWidgetID: There are multiple identical st.button widgets with the same generated key.

When a widget is created, it's assigned an internal key based on its structure. Multiple widgets with an identical structure will result in the same internal key, which causes this error.

To fix this error, please pass a unique key argument to st.button. '''

SNAG-0086

mkhorasani commented 2 years ago

Please ensure that you have no duplicate 'logout' buttons that have the exact same name as the ones being used for the login form.