Hi,
I’ve got some issues with my app. Some widgets didn’t work online but work locally.
When i use them online, i’ve got this :
https://share.streamlit.io/mathg15/graphicinterfacemoosh/appStreamlit.py
https://github.com/mathg15/GraphicInterfaceMoosh
Traceback (most recent call last):
File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/script_runner.py”, line 350, in _run_script
exec(code, module.dict)
File “/app/graphicinterfacemoosh/appStreamlit.py”, line 34, in
genmoosh()
File “/app/graphicinterfacemoosh/Pages/MooshGenPage.py”, line 17, in genmoosh
gen = mooshGen(strucSlider, pol)
File “/app/graphicinterfacemoosh/Main/MooshGen.py”, line 30, in init
self.mat1 = widget.selecBoxGen1()
File “/app/graphicinterfacemoosh/Tools/widget.py”, line 43, in selecBoxGen1
return st.selectbox(“Choix du matériau 1”, (“Air”, “Eau”, “Bk7”, “SiO2”, “TiO2”, “Au”, “Cr”,“Ag”,“ZnO”), key=1)
File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/elements/selectbox.py”, line 121, in selectbox
current_value, set_frontend_value = register_widget(
File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/state/widgets.py”, line 133, in register_widget
element_proto.id = widget_id
TypeError: 1 has type int, but expected one of: bytes, unicode
It seems like key does not accept int.
The problem is that the application works in local and it was working 1 month ago.
How can i fix this ?
Thanks !