{"record":{"id":"21457e8c63a4cab1","repo":"iflytek/astron-agent","slug":"local-file-does-not-exist-file","errorCode":null,"errorMessage":"Local file does not exist: {file}","messagePattern":"Local file does not exist: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"core/knowledge/infra/ragflow/ragflow_utils.py","lineNumber":250,"sourceCode":"            filename = urllib.parse.unquote(raw_filename, encoding=\"utf-8\")\n\n        return filename\n\n    @staticmethod\n    def _read_local_file(file: str) -> tuple[bytes, str]:\n        \"\"\"\n        Read local file\n\n        Args:\n            file: Local file path\n\n        Returns:\n            (file content, filename)\n        \"\"\"\n        logger.info(f\"Reading local file: {file}\")\n\n        if not os.path.exists(file):\n            raise Exception(f\"Local file does not exist: {file}\")\n\n        with open(file, \"rb\") as f:\n            file_content = f.read()\n        filename = os.path.basename(file)\n\n        logger.info(\n            f\"Local file reading completed: {filename}, size: {len(file_content)} bytes\"\n        )\n        return file_content, filename\n\n    @staticmethod\n    async def process_file(file_input: Union[str, UploadFile]) -> tuple[bytes, str]:\n        \"\"\"\n        Process file (download, read local file, or handle upload file)\n\n        Args:\n            file_input: File path/URL (str) or UploadFile object\n","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/knowledge/infra/ragflow/ragflow_utils.py#L232-L268","documentation":"_read_local_file raises when the given local path does not exist on disk (os.path.exists fails). The ingestion path expected a readable file but got a missing/stale path — a filesystem-input validation before open().","triggerScenarios":"Thrown at core/knowledge/infra/ragflow/ragflow_utils.py:250 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the file path and that the file was uploaded/cleaned correctly","Check mount/volume configuration if running in containers","Handle missing files gracefully in the upload pipeline"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}