{"record":{"id":"9caff9fd5a7352da","repo":"agentscope-ai/agentscope","slug":"the-table-format-must-be-one-of-markdown-or-jso-9caff9","errorCode":null,"errorMessage":"The table_format must be one of 'markdown' or 'json', got {table_format!r}.","messagePattern":"The table_format must be one of 'markdown' or 'json', got (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/agentscope/rag/_parser/_ppt.py","lineNumber":158,"sourceCode":"                syntax, escaping pipes and rendering cell line breaks\n                as ``<br>``; ``\"json\"`` emits a JSON array prefixed with\n                a ``<system-info>`` marker and preserves extracted cell\n                strings without Markdown rendering.\n            slide_prefix (`str | None`, defaults to\n                ``\"<slide index={index}>\"``):\n                Prepended to the first text section of each slide.\n                Supports the ``{index}`` placeholder (starting at 1).  Use\n                ``None`` to disable.\n            slide_suffix (`str | None`, defaults to ``\"</slide>\"``):\n                Appended to the last text section of each slide.  Use\n                ``None`` to disable.\n\n        Raises:\n            `ValueError`: If ``table_format`` is not one of\n                ``\"markdown\"`` / ``\"json\"``.\n        \"\"\"\n        if table_format not in (\"markdown\", \"json\"):\n            raise ValueError(\n                \"The table_format must be one of 'markdown' or 'json', \"\n                f\"got {table_format!r}.\",\n            )\n        self.include_image = include_image\n        self.separate_table = separate_table\n        self.table_format = table_format\n        self.slide_prefix = slide_prefix\n        self.slide_suffix = slide_suffix\n\n    async def parse(\n        self,\n        file: bytes | str,\n        filename: str,\n    ) -> list[Section]:\n        \"\"\"Parse a PPTX file into a list of :class:`Section` objects.\n\n        Args:\n            file (`bytes | str`):","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/agentscope-ai/agentscope/blob/e90f1c7592896cc95f6e5ee506194f533378247d/src/agentscope/rag/_parser/_ppt.py#L140-L176","documentation":"PPTParser only accepts table_format of 'markdown' or 'json'; any other value is rejected in __init__ with a ValueError echoing the invalid value.","triggerScenarios":"Constructing PPTParser(table_format='csv') or 'md'/'Markdown' (case-sensitive) or 'html'.","commonSituations":"Abbreviations like 'md'; case mismatch from configs; sharing format constants across parsers with different allowed values.","solutions":["Use exactly 'markdown' or 'json' (lowercase)","Normalize user/config input to the allowed set before construction"],"exampleFix":"# before\nparser = PPTParser(table_format='md')\n\n# after\nparser = PPTParser(table_format='markdown')","handlingStrategy":"validation","validationCode":"assert table_format in ('markdown', 'json'), f\"bad table_format: {table_format}\"","typeGuard":"def is_table_format(v: str) -> bool:\n    return v in ('markdown', 'json')","tryCatchPattern":null,"preventionTips":["Use Literal['markdown','json'] in config models","Normalize input casing/abbreviations before constructing parsers"],"tags":["agentscope","rag","pptx","parser","config"],"backgroundTag":"invalid-enum-value","analyzedSha":"e90f1c7592896cc95f6e5ee506194f533378247d","analyzedAt":"2026-08-28T18:24:12.087Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}