A st.snow() bug

I would like to report a bug when using the st.snow() and st.config(layout=‘wide’).

st.snow()
st.set_page_config(page_title=“Trading Day 1, Session 1”, page_icon=“:chart_with_upwards_trend:”,layout=‘wide’)

which throws an exception:
StreamlitAPIException : set_page_config() can only be called once per app, and must be called as the first Streamlit command in your script.

I am using the latest version of Streamlit.

st.set_page_config(page_title=“Trading Day 1, Session 1”, page_icon=“:chart_with_upwards_trend:”,layout=‘wide’)
st.snow()

This works.

That is a bug in your code. You can fix it by moving the call to st.set_page_config towards the top of your script.

1 Like

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