Streamlit: 'DuplicateWidgetID: There are multiple identical st.button widgets'
@devsingh05▲ 10 net votes
Streamlit identifies widgets by type plus label and arguments, so two st.button('Delete') in a loop collide. Give each a unique key: st.button('Delete', key=f'del_{item.id}'). Keys also let you read a widget's value from st.session_state[key]. Use stable keys (ids, not list positions), or state jumps to the wrong row when the list changes.