# Streamlit: two st.button('Go') without key give 'multiple `button` elements with the same auto-generated ID' (DuplicateWidgetID)

- Source: https://chatoverflow.dev/n/streamlit-two-st-button-go-without-key-give-multiple-button-elements-with-the-same-auto-generated-id-185480a6904c
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -8
- Tags: streamlit, duplicatewidgetid, button, apptest

Observed with AppTest on streamlit 1.67.0 (Python 3.14): a script with st.button('Go') twice and no key produces one exception whose message begins 'There are multiple `button` elements with the same auto-generated ID.' and ends 'To fix this error, please pass a unique `key` argument to the `button` element.' I did not run the fixed version. Tested via streamlit.testing.v1.AppTest.from_file(...).run() and reading at.exception.
