Please help me , how to fix DuplicateWidgetID: There are multiple identical st.checkbox widgets with key='1'

I’m just working on a library management system using streamlit but when I add a while loop inside my code it will gives me DuplicateWidgetID : There are multiple identical st.checkbox widgets with key='1' Error .

So , Please Help me It’s my college project.

Hi @sarthak -

In your app, you are redefining the widgets over and over again. If you move the display and borrow elements out of the while loop, it should fix this error and do what you are expecting.

Best,
Randy