{"record":{"id":"f91efd4d732629ed","repo":"HKUDS/DeepTutor","slug":"lightrag-is-not-installed-run-pip-install-deept","errorCode":null,"errorMessage":"LightRAG is not installed. Run `pip install 'deeptutor[rag-lightrag]'` on the server before creating a LightRAG knowledge base.","messagePattern":"LightRAG is not installed\\. Run `pip install 'deeptutor\\[rag-lightrag\\]'` on the server before creating a LightRAG knowledge base\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"deeptutor/api/routers/knowledge.py","lineNumber":717,"sourceCode":"            check\n            for check in report.get(\"checks\", [])\n            if not check.get(\"optional\") and not check.get(\"ok\")\n        ]\n        if failed_checks:\n            failure_details = \"; \".join(\n                str(check.get(\"detail\") or check.get(\"label\") or \"Requirement not met\")\n                for check in failed_checks\n            )\n            raise HTTPException(\n                status_code=409,\n                detail=f\"GraphRAG preflight failed: {failure_details}\",\n            )\n\n    if provider == LIGHTRAG_PROVIDER:\n        from deeptutor.services.rag.pipelines.lightrag.config import is_lightrag_available\n\n        if not is_lightrag_available():\n            raise HTTPException(\n                status_code=400,\n                detail=(\n                    \"LightRAG is not installed. Run \"\n                    \"`pip install 'deeptutor[rag-lightrag]'` on the server before \"\n                    \"creating a LightRAG knowledge base.\"\n                ),\n            )\n\n\ndef _enforce_provider_formats(provider: str, files: list[UploadFile]) -> None:\n    \"\"\"Reject files PageIndex's document endpoint does not accept, up front.\"\"\"\n    if provider not in {PAGEINDEX_PROVIDER, PAGEINDEX_OSS_PROVIDER}:\n        return\n    from deeptutor.services.rag.pipelines.pageindex.pipeline import (\n        OSS_SUPPORTED_EXTENSIONS,\n        SUPPORTED_EXTENSIONS,\n    )\n","sourceCodeStart":699,"sourceCodeEnd":735,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/knowledge.py#L699-L735","documentation":"Raised by _assert_provider_ready when provider is lightrag and is_lightrag_available() is False — the optional LightRAG dependency group is not installed on the server. Identical pattern to the GraphRAG missing-package error (150) but for the rag-lightrag extra.","triggerScenarios":"Creating/uploading/reindexing a KB with provider=lightrag on an environment installed without `deeptutor[rag-lightrag]`.","commonSituations":"Default pip install without extras; Docker image built from a requirements file that omits the lightrag group; upgrading deeptutor dropped the previously-installed extra.","solutions":["Install the extra on the server: pip install 'deeptutor[rag-lightrag]'","Verify availability from the server venv (import is_lightrag_available and assert True)","Restart the server and retry"],"exampleFix":"# before\npip install deeptutor\n# after\npip install 'deeptutor[rag-lightrag]'","handlingStrategy":"validation","validationCode":"from deeptutor.services.rag.pipelines.lightrag.config import is_lightrag_available\nassert is_lightrag_available(), \"pip install 'deeptutor[rag-lightrag]'\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install the rag-lightrag extra on servers offering LightRAG","Re-verify extras after upgrading deeptutor","Gate provider options on runtime availability checks"],"tags":["lightrag","rag","missing-dependency","install","http-400"],"backgroundTag":"missing-optional-dependency","analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}