{"record":{"id":"6c0c91f4d3e2d579","repo":"crewAIInc/crewAI","slug":"document-not-found-file-path","errorCode":null,"errorMessage":"Document not found: {file_path}","messagePattern":"Document not found: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/contextualai_parse_tool/contextual_parse_tool.py","lineNumber":59,"sourceCode":"        parse_mode: str = \"standard\",\n        figure_caption_mode: str = \"concise\",\n        enable_document_hierarchy: bool = True,\n        page_range: str | None = None,\n        output_types: list[str] | None = None,\n    ) -> str:\n        \"\"\"Parse a document using Contextual AI's parser.\"\"\"\n        if output_types is None:\n            output_types = [\"markdown-per-page\"]\n        file_path = validate_file_path(file_path)\n        try:\n            import json\n            import os\n            from time import sleep\n\n            import requests\n\n            if not os.path.exists(file_path):\n                raise FileNotFoundError(f\"Document not found: {file_path}\")\n\n            base_url = \"https://api.contextual.ai/v1\"\n            headers = {\n                \"accept\": \"application/json\",\n                \"authorization\": f\"Bearer {self.api_key}\",\n            }\n\n            # Submit parse job\n            url = f\"{base_url}/parse\"\n            config = {\n                \"parse_mode\": parse_mode,\n                \"figure_caption_mode\": figure_caption_mode,\n                \"enable_document_hierarchy\": enable_document_hierarchy,\n            }\n\n            if page_range:\n                config[\"page_range\"] = page_range\n","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/contextualai_parse_tool/contextual_parse_tool.py#L41-L77","documentation":"Error \"Document not found: {file_path}\" thrown in crewAIInc/crewAI.","triggerScenarios":"Thrown at lib/crewai-tools/src/crewai_tools/tools/contextualai_parse_tool/contextual_parse_tool.py:59 when the library encounters an invalid state.","commonSituations":"Occurs when the document path passed to the Contextual AI parse tool does not exist. Verify the path and that the file is accessible.","solutions":["Verify the document path exists and is readable.","Use an absolute path or a path relative to the current working directory."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}