Summary
Share a clear and concise description of the issue. Aim for 2-3 sentences.
Steps to reproduce
Code snippet:
st.subheader("📜 📖 Toutes les catégories de tout les livres du site 📖")
# option = st.selectbox(
# 'Quel catégorie souhaitez-vous extraire ?',
# (nom_catgs))
#
# st.write('Vous avez selectionner :', option)
# clé3="3"
for name in nom_catgs:
option = st.selectbox(
'Quel catégorie souhaitez-vous extraire ?',
(nom_catgs))
st.write('Vous avez selectionner :', option)
clé3 = "3"
if option == name:
print(option)
with open('category/'+ name + '/data_'+ name + '.csv') as all:
button = st.download_button(label='Download ' + name + ' CSV', data=open('category/' + name + '/data_' + name + '.csv'),
file_name= 'data_' + name + '.csv',
mime='text/csv', key=clé3)
st.text(f'💾 🧛 Votre fichier CSV sur la catégorie ' + name + ' viens d\'être crée.')
st.text("Vous pouvez le télécharger !")
Expected behavior:
DuplicateWidgetID: There are multiple identical st.selectbox 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.selectbox.
.
Debug info
- Streamlit version: Streamlit, version 1.14.0
- Python version: Python 3.9.13
- Using PyEnv
- OS version: Window 10
- Browser version:Google Chrome
Requirements file
Links
- Link to your GitHub repo: GitHub - WolfSilver0509/Scrapping_P2_StreamLit
- Link to your deployed app: https://wolfsilver0509-scrapping-p2-streamlit-main-ht9ia3.streamlit.app/
Additional information
Please help me , i don’t understand why is not good ?
I read other topic about it , but the result of other topic don’t good for my test !
Sorry for my english , I’am french !