StreamlitAPIException: Every Multiselect default value must exist in options

I am getting the below error. Can someone explain please what is wrong? The API documentation also doesn’t explain clearly.

StreamlitAPIException: Every Multiselect default value must exist in options

Traceback:

File "/workspace/rb-rbcore-frontend/pages/0404_~_Doc_Analyzer.py", line 37, in <module>
    tab1.contents()File "/workspace/rb-rbcore-frontend/components/assets_Doc_Analyzer/components/tab1.py", line 551, in contents
    selected_pages = st.multiselect('Selected pages', options=list([1, 2, 3]), default=list([1, 2, 3]), label_visibility="visible", key="tab1_widget_selected_pages"

There is a missing right parenthesis in the code, probably a mistake while copying and pasting. After fixing that, the code works for me.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.