Fork of Eye Hospital App was forked from Fork of Eye Hospital App
Continue chatting to ask questions about or make changes to it.
app.py
AttributeError: module 'streamlit' has no attribute 'experimental_rerun' Traceback: File "C:\Users\ELCOT\Desktop\projectfinal\app.py", line 1693, in <module> main() File "C:\Users\ELCOT\Desktop\projectfinal\app.py", line 1690, in main show_login_page() File "C:\Users\ELCOT\Desktop\projectfinal\app.py", line 257, in show_login_page st.experimental_rerun()
I'll fix the error by updating all instances of st.experimental_rerun()
to st.rerun()
, which is the current method in newer versions of Streamlit.
The error you're encountering is because st.experimental_rerun()
is deprecated in newer versions of Streamlit. I've updated all instances to use st.rerun()
instead, which is the current recommended method.
To implement this fix:
app.py
filest.experimental_rerun()
to st.rerun()
This should resolve the error and allow your Eye Hospital Management System to run properly with your current version of Streamlit.
streamlit.errors.StreamlitDuplicateElementId: There are multiple button elements with the same auto-generated ID. When this element is created, it is assigned an internal ID based on the element type and provided parameters. Multiple elements with the same type and parameters will cause this error.
To fix this error, please pass a unique key argument to the button element.
Traceback: File "C:\Users\ELCOT\Desktop\KING\app.py", line 1732, in <module> main() File "C:\Users\ELCOT\Desktop\KING\app.py", line 1727, in main show_billing() File "C:\Users\ELCOT\Desktop\KING\app.py", line 1416, in show_billing if st.button("Create Bill"): File "C:\Users\ELCOT\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\metrics_util.py", line 410, in wrapped_func result = non_optional_func(*args, **kwargs) File "C:\Users\ELCOT\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\elements\widgets\button.py", line 243, in button return self.dg._button( File "C:\Users\ELCOT\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\elements\widgets\button.py", line 1010, in _button element_id = compute_and_register_element_id( File "C:\Users\ELCOT\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\elements\lib\utils.py", line 241, in compute_and_register_element_id _register_element_id(ctx, element_type, element_id) File "C:\Users\ELCOT\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\elements\lib\utils.py", line 147, in _register_element_id raise StreamlitDuplicateElementId(element_type)