{"record":{"id":"5ecfd7c8c0e27f20","repo":"xtekky/gpt4free","slug":"install-markitdown","errorCode":null,"errorMessage":"Install markitdown","messagePattern":"Install markitdown","errorType":"exception","errorClass":"MissingRequirementsError","httpStatus":null,"severity":"error","filePath":"g4f/cli/client.py","lineNumber":363,"sourceCode":"        for idx, tok in enumerate(args.input):\n            if tok.startswith((\"http://\", \"https://\")):\n                try:\n                    async with session.head(tok, allow_redirects=True) as resp:\n                        is_ok = resp.status == 200\n                        content_type = resp.headers.get(\"Content-Type\", \"\")\n                except Exception:\n                    is_ok = False\n                    content_type = \"\"\n\n                if is_ok and content_type.startswith(\"image\"):\n                    media.append(tok)\n                else:\n                    try:\n                        from g4f.integration.markitdown import MarkItDown\n                    except ImportError:\n                        from g4f.errors import MissingRequirementsError\n\n                        raise MissingRequirementsError(\"Install markitdown\")\n\n                    def run_markitdown(url):\n                        md = MarkItDown()\n                        return md.convert_url(url).text_content\n\n                    txt = await asyncio.to_thread(run_markitdown, tok)\n                    input_txt += f\"\\n```source: {tok}\\n{txt}\\n```\\n\"\n            elif os.path.isfile(tok):\n                from g4f.image import is_accepted_format\n\n                head = Path(tok).read_bytes()[:12]\n                try:\n                    if is_accepted_format(head):\n                        media.append(Path(tok))\n                        is_img = True\n                    else:\n                        is_img = False\n                except ValueError:","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/xtekky/gpt4free/blob/973504e1770928ed5fb82f43da528f441ad9ddc3/g4f/cli/client.py#L345-L381","documentation":"Error \"Install markitdown\" thrown in xtekky/gpt4free.","triggerScenarios":"Thrown at g4f/cli/client.py:363 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install markitdown: pip install markitdown."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"973504e1770928ed5fb82f43da528f441ad9ddc3","analyzedAt":"2026-08-14T23:45:32.408Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}