{"record":{"id":"245fefd9ae4e450b","repo":"streamlit/streamlit","slug":"st-bottom-cannot-be-used-inside-event-containers","errorCode":null,"errorMessage":"`st.bottom` cannot be used inside event containers. The bottom container is only available in the main app area.","messagePattern":"`st\\.bottom` cannot be used inside event containers\\. The bottom container is only available in the main app area\\.","errorType":"validation","errorClass":"StreamlitAPIException","httpStatus":null,"severity":"error","filePath":"lib/streamlit/elements/bottom.py","lineNumber":66,"sourceCode":"            return\n\n        current_dg = current_stack[-1]\n        root_container = current_dg._root_container\n\n        if root_container == RootContainer.SIDEBAR:\n            raise StreamlitAPIException(\n                \"`st.bottom` cannot be used inside `st.sidebar`. \"\n                \"The bottom container is only available in the main app area.\"\n            )\n        # Check for dialog first since dialogs use EVENT root container\n        # but should get a more specific error message\n        if \"dialog\" in current_dg._ancestor_block_types:\n            raise StreamlitAPIException(\n                \"`st.bottom` cannot be used inside a dialog. \"\n                \"The bottom container is only available in the main app area.\"\n            )\n        if root_container == RootContainer.EVENT:\n            raise StreamlitAPIException(\n                \"`st.bottom` cannot be used inside event containers. \"\n                \"The bottom container is only available in the main app area.\"\n            )\n\n    def __getattr__(self, name: str) -> Any:\n        self._check_context()\n        return getattr(self._bottom_dg, name)\n\n    def __dir__(self) -> list[str]:\n        \"\"\"Return DeltaGenerator methods for IDE autocompletion.\"\"\"\n        return dir(self._bottom_dg)\n\n    def __enter__(self) -> None:\n        self._check_context()\n        self._bottom_dg.__enter__()\n\n    def __exit__(\n        self,","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/streamlit/streamlit/blob/202661fc552db98c2ba0bb0e113d619689baf9de/lib/streamlit/elements/bottom.py#L48-L84","documentation":"Error \"`st.bottom` cannot be used inside event containers. The bottom container is only available in the main app area.\" thrown in streamlit/streamlit.","triggerScenarios":"Thrown at lib/streamlit/elements/bottom.py:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"202661fc552db98c2ba0bb0e113d619689baf9de","analyzedAt":"2026-08-26T09:13:21.291Z","schemaVersion":2},"datasetVersion":"2026-08-26T14:46:13.012Z"}