{"record":{"id":"e3f36678012fd550","repo":"deepset-ai/haystack","slug":"unknown-link-format-link-format-supported-for-e3f366","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/xlsx.py","lineNumber":86,"sourceCode":"            - If `table_format` is \"csv\", these arguments are passed to `pandas.DataFrame.to_csv`.\n              See https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html#pandas-dataframe-to-csv\n            - If `table_format` is \"markdown\", these arguments are passed to `pandas.DataFrame.to_markdown`.\n              See https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_markdown.html#pandas-dataframe-to-markdown\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        :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        \"\"\"\n        pandas_xlsx_import.check()\n        self.table_format = table_format\n        if table_format not in [\"csv\", \"markdown\"]:\n            raise ValueError(f\"Unsupported export format: {table_format}. Choose either 'csv' or 'markdown'.\")\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        if table_format == \"markdown\":\n            tabulate_import.check()\n        self.link_format = link_format\n        self.sheet_name = sheet_name\n        self.read_excel_kwargs = read_excel_kwargs or {}\n        self.table_format_kwargs = table_format_kwargs or {}\n        self.store_full_path = store_full_path\n\n    @component.output_types(documents=list[Document])\n    def run(\n        self, sources: list[str | Path | ByteStream], meta: dict[str, Any] | list[dict[str, Any]] | None = None\n    ) -> dict[str, list[Document]]:\n        \"\"\"\n        Converts a XLSX file to a Document.\n\n        :param sources:\n            List of file paths or ByteStream objects.\n        :param meta:","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/components/converters/xlsx.py#L68-L104","documentation":"XLSXToDocument's __init__ validates link_format: it must be one of 'markdown', 'plain', or 'none'. Unlike LinkFormat.from_str, this check is a literal tuple membership test and is case-sensitive. Invalid values raise ValueError during component construction.","triggerScenarios":"Instantiating XLSXToDocument(link_format=...) with e.g. 'md', 'text', 'href', 'Markdown', or a LinkFormat enum object (an enum instance is not equal to the plain strings in the tuple).","commonSituations":"Typo or wrong casing in pipeline YAML; passing a PyPDF/XLSX LinkFormat enum member where a raw string is expected; copying link_format values from other converters that use different vocabularies.","solutions":["Pass exactly 'markdown', 'plain', or 'none' (lowercase strings).","If you have a LinkFormat enum, pass .value (e.g. LinkFormat.MARKDOWN.value) — but only if it equals one of the three accepted strings.","Match casing exactly; the membership test is case-sensitive."],"exampleFix":"# before\nfrom haystack.components.converters.utils import LinkFormat\nconverter = XLSXToDocument(link_format=LinkFormat.MARKDOWN)  # enum, not str\n# after\nconverter = XLSXToDocument(link_format=\"markdown\")","handlingStrategy":"validation","validationCode":"VALID_LINK_FORMATS = (\"markdown\", \"plain\", \"none\")\n\nassert link_format in VALID_LINK_FORMATS, (\n    f\"link_format={link_format!r} invalid; use one of {VALID_LINK_FORMATS}\"\n)","typeGuard":"from typing import Literal\nLinkFmt = Literal[\"markdown\", \"plain\", \"none\"]\n\ndef is_link_fmt(v: object) -> bool:\n    return isinstance(v, str) and v in (\"markdown\", \"plain\", \"none\")","tryCatchPattern":"try:\n    converter = XLSXToDocument(link_format=link_format)\nexcept ValueError as e:\n    logger.warning(\"Invalid link_format, defaulting to 'markdown': %s\", e)\n    converter = XLSXToDocument(link_format=\"markdown\")","preventionTips":["Pass plain strings, never LinkFormat enum instances, to XLSXToDocument(link_format=...)","Use the Literal[\"markdown\", \"plain\", \"none\"] type annotation in your wrapper code","Validate YAML config string values against the accepted tuple before constructing the component"],"tags":["python","valueerror","xlsx","invalid-argument"],"backgroundTag":"invalid-enum-value","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}