Yeah, it’s working great for task where a lot of person already did the code. Streamlit is quite “new”, the model are not train on the new feature.
First, what version of streamlit are you ? I saw a st.experimental_rerun() it’s not this anymore since 1.26 : st.rerun().
dupliicate widget id error is because you got multiple widget with the same ID (each widget got a “key”). In the for loop if the same widget is create multiple times, it will create this error.
To fix this, you need to ensure you don’t have duplicate :
Example
st.button("Back to Course Sections")
st.button("Back to Course Sections", key="UNIQUEKEY")