{"record":{"id":"65a72d9a249ce046","repo":"streamlit/streamlit","slug":"st-bottom-cannot-be-used-inside-st-sidebar-th","errorCode":null,"errorMessage":"`st.bottom` cannot be used inside `st.sidebar`. The bottom container is only available in the main app area.","messagePattern":"`st\\.bottom` cannot be used inside `st\\.sidebar`\\. 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":54,"sourceCode":"    \"\"\"\n\n    _bottom_dg: DeltaGenerator\n\n    def __init__(self, bottom_dg: DeltaGenerator) -> None:\n        # Use object.__setattr__ to avoid triggering __getattr__\n        object.__setattr__(self, \"_bottom_dg\", bottom_dg)\n\n    def _check_context(self) -> None:\n        \"\"\"Raise StreamlitAPIException if st.bottom is used in an invalid context.\"\"\"\n        current_stack = context_dg_stack.get()\n        if not current_stack:\n            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()","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/streamlit/streamlit/blob/202661fc552db98c2ba0bb0e113d619689baf9de/lib/streamlit/elements/bottom.py#L36-L72","documentation":"Error \"`st.bottom` cannot be used inside `st.sidebar`. The bottom container is only available in the main app area.\" thrown in streamlit/streamlit.","triggerScenarios":"Thrown at lib/streamlit/elements/bottom.py:54 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"}