{"record":{"id":"e004d977cdc3466d","repo":"deepset-ai/haystack","slug":"unknown-link-format-link-format-supported-for","errorCode":null,"errorMessage":"Unknown link format '{link_format}'. Supported formats are: 'markdown', 'plain', 'none'","messagePattern":"Unknown link format '(.+?)'\\. Supported formats are: 'markdown', 'plain', 'none'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"haystack/components/converters/pptx.py","lineNumber":62,"sourceCode":"\n    def __init__(\n        self, store_full_path: bool = False, link_format: Literal[\"markdown\", \"plain\", \"none\"] = \"none\"\n    ) -> None:\n        \"\"\"\n        Create a PPTXToDocument component.\n\n        :param store_full_path:\n            If True, the full path of the file is stored in the metadata of the document.\n            If False, only the file name is stored.\n        :param link_format: The format for link output. Possible options:\n            - `\"markdown\"`: `[text](url)`\n            - `\"plain\"`: `text (url)`\n            - `\"none\"`: Only the text is extracted, link addresses are ignored.\n        \"\"\"\n        pptx_import.check()\n        if link_format not in (\"markdown\", \"plain\", \"none\"):\n            msg = f\"Unknown link format '{link_format}'. Supported formats are: 'markdown', 'plain', 'none'\"\n            raise ValueError(msg)\n        self.link_format = link_format\n        self.store_full_path = store_full_path\n\n    def to_dict(self) -> dict[str, Any]:\n        \"\"\"\n        Serializes the component to a dictionary.\n\n        :returns:\n            Dictionary with serialized data.\n        \"\"\"\n        return default_to_dict(self, link_format=self.link_format, store_full_path=self.store_full_path)\n\n    def _convert(self, file_content: io.BytesIO) -> str:\n        \"\"\"\n        Converts the PPTX file to text.\n        \"\"\"\n        pptx_presentation = Presentation(file_content)\n        text_all_slides = []","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/components/converters/pptx.py#L44-L80","documentation":"PPTXToDocument formats hyperlinks according to the link_format option, which must be one of 'markdown', 'plain', or 'none'. Any other value fails fast in __init__ with ValueError listing the supported formats.","triggerScenarios":"PPTXToDocument(link_format=\"html\") or any misspelled/unsupported value (e.g. 'md', 'text', 'url'); also occurs after deserialization if a stored init_parameters link_format is invalid.","commonSituations":"Typos or guessing the format names; older serialized pipelines from before link_format existed or with different accepted values; passing a variable that was expected to be validated upstream.","solutions":["Use one of the exact strings: 'markdown', 'plain', or 'none'","Check for typos/case: values are lowercase","If loading from YAML, fix the link_format value in the file"],"exampleFix":"// before\nconverter = PPTXToDocument(link_format=\"md\")\n// after\nconverter = PPTXToDocument(link_format=\"markdown\")","handlingStrategy":"validation","validationCode":"VALID_LINK_FORMATS = {\"markdown\", \"plain\", \"none\"}\ndef make_pptx_converter(link_format=\"plain\", **kw):\n    if link_format not in VALID_LINK_FORMATS:\n        raise ValueError(f\"link_format must be one of {sorted(VALID_LINK_FORMATS)}\")\n    return PPTXToDocument(link_format=link_format, **kw)","typeGuard":null,"tryCatchPattern":"try:\n    converter = PPTXToDocument(link_format=lf)\nexcept ValueError as e:\n    converter = PPTXToDocument(link_format=\"plain\")  # safe default","preventionTips":["Use only the documented values: 'markdown', 'plain', 'none'","Validate user-supplied format options against a whitelist","Re-check link_format in stored YAML after upgrading Haystack"],"tags":["python","haystack","pptx-converter","invalid-argument","configuration"],"backgroundTag":"invalid-enum-value","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}