streamlit/streamlit · error · StreamlitAPIException

`st.bottom` cannot be used inside event containers. The bott

Error message

`st.bottom` cannot be used inside event containers. The bottom container is only available in the main app area.

What it means

Error "`st.bottom` cannot be used inside event containers. The bottom container is only available in the main app area." thrown in streamlit/streamlit.

Source

Thrown at lib/streamlit/elements/bottom.py:66

            return

        current_dg = current_stack[-1]
        root_container = current_dg._root_container

        if root_container == RootContainer.SIDEBAR:
            raise StreamlitAPIException(
                "`st.bottom` cannot be used inside `st.sidebar`. "
                "The bottom container is only available in the main app area."
            )
        # Check for dialog first since dialogs use EVENT root container
        # but should get a more specific error message
        if "dialog" in current_dg._ancestor_block_types:
            raise StreamlitAPIException(
                "`st.bottom` cannot be used inside a dialog. "
                "The bottom container is only available in the main app area."
            )
        if root_container == RootContainer.EVENT:
            raise StreamlitAPIException(
                "`st.bottom` cannot be used inside event containers. "
                "The bottom container is only available in the main app area."
            )

    def __getattr__(self, name: str) -> Any:
        self._check_context()
        return getattr(self._bottom_dg, name)

    def __dir__(self) -> list[str]:
        """Return DeltaGenerator methods for IDE autocompletion."""
        return dir(self._bottom_dg)

    def __enter__(self) -> None:
        self._check_context()
        self._bottom_dg.__enter__()

    def __exit__(
        self,

View on GitHub (pinned to 202661fc55)

When it happens

Trigger: Thrown at lib/streamlit/elements/bottom.py:66 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of streamlit/streamlit@202661fc55 (2026-08-26). Data as JSON: /api/errors/245fefd9ae4e450b. Report an issue: GitHub.