{"record":{"id":"b09c0e4e8d26ea41","repo":"streamlit/streamlit","slug":"theme-file-not-found-file-path-or-url","errorCode":null,"errorMessage":"Theme file not found: {file_path_or_url}","messagePattern":"Theme file not found: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"lib/streamlit/config_util.py","lineNumber":605,"sourceCode":"    file_path_or_url: str, config_options_template: dict[str, ConfigOption]\n) -> dict[str, Any]:\n    \"\"\"\n    Load and parse a theme TOML file from a local path or URL.\n\n    Handles raising errors when a file cannot be found, read, parsed,\n    or contains invalid theme options.\n\n    Otherwise returns the parsed TOML content as a dictionary.\n    \"\"\"\n\n    def _raise_missing_toml() -> None:\n        raise StreamlitInvalidThemeError(\n            \"The 'toml' package is required to load theme files. \"\n            \"Please install it with 'pip install toml'.\"\n        )\n\n    def _raise_file_not_found() -> None:\n        raise FileNotFoundError(f\"Theme file not found: {file_path_or_url}\")\n\n    def _raise_missing_theme_section() -> None:\n        raise StreamlitInvalidThemeSectionError(\n            f\"Theme file {file_path_or_url} must contain a [theme] section\"\n        )\n\n    def _raise_file_too_large() -> None:\n        content_size = len(content.encode(\"utf-8\"))\n        raise StreamlitInvalidThemeError(\n            f\"Theme file {file_path_or_url} is too large ({content_size:,} bytes). \"\n            f\"Maximum allowed size is {_MAX_THEME_FILE_SIZE_BYTES:,} bytes (1MB). \"\n            f\"Theme files should contain only configuration options, not large data.\"\n        )\n\n    try:\n        import toml\n    except ImportError:\n        _raise_missing_toml()","sourceCodeStart":587,"sourceCodeEnd":623,"githubUrl":"https://github.com/streamlit/streamlit/blob/202661fc552db98c2ba0bb0e113d619689baf9de/lib/streamlit/config_util.py#L587-L623","documentation":"Error \"Theme file not found: {file_path_or_url}\" thrown in streamlit/streamlit.","triggerScenarios":"Thrown at lib/streamlit/config_util.py:605 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"}