{"record":{"id":"7205126b119a82be","repo":"zylon-ai/private-gpt","slug":"qdrant-vector-store-dependencies-are-not-installed","errorCode":null,"errorMessage":"Qdrant vector store dependencies are not installed. Install with `uv sync --inexact --extra vectorstore-qdrant`.","messagePattern":"Qdrant vector store dependencies are not installed\\. Install with `uv sync --inexact --extra vectorstore-qdrant`\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"private_gpt/components/vector_store/qdrant_factory.py","lineNumber":28,"sourceCode":"from private_gpt.utils.dependencies import format_missing_dependency_message\n\nDEFAULT_COLLECTION = \"zgptvector\"\n\n\nclass QdrantVectorStoreFactory(VectorStoreFactory):\n    def __init__(self, settings: Settings, embed_dim: int | None = None) -> None:\n        super().__init__(settings)\n        self._client: Any | None = None\n        self._client_lock = Lock()\n        self._embed_dim = embed_dim\n\n    def _build_client(self) -> Any:\n        try:\n            from private_gpt.components.vector_store.qdrant_client_builder import (\n                QdrantClientBuilder,\n            )\n        except ImportError as e:\n            raise ImportError(\n                format_missing_dependency_message(\n                    \"Qdrant vector store\",\n                    extras=\"vectorstore-qdrant\",\n                )\n            ) from e\n\n        return QdrantClientBuilder.build_clients(self.settings)\n\n    def _ensure_client(self) -> None:\n        if self._client is not None:\n            return\n        with self._client_lock:\n            if self._client is None:\n                self._client = self._build_client()\n\n    def warm_up(self) -> None:\n        self._ensure_client()\n","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/components/vector_store/qdrant_factory.py#L10-L46","documentation":"ImportError raised by QdrantVectorStoreFactory._build_client when importing qdrant_client_builder fails because the Qdrant optional dependencies ('vectorstore-qdrant' extra) are not installed. It wraps the raw ImportError with a formatted, actionable install message via format_missing_dependency_message.","triggerScenarios":"Setting vectorstore.database to 'qdrant' (or otherwise triggering client construction) in an environment installed without the vectorstore-qdrant extra; raised lazily on first _ensure_client()/_build_client() call (e.g. warm_up), not at import time.","commonSituations":"Minimal deployment images that skip optional extras; local dev installs with `uv sync --inexact` dropping extras; adding qdrant settings to an env whose lockfile lacks qdrant-client.","solutions":["Install the extra: uv sync --inexact --extra vectorstore-qdrant (or pip install with the matching extra)","Verify qdrant-client imports in the deployed environment afterwards","If Qdrant is not intended, change vectorstore.database to an installed provider"],"exampleFix":"# before\nuv sync --inexact\n# after\nuv sync --inexact --extra vectorstore-qdrant","handlingStrategy":"validation","validationCode":"def qdrant_deps_available() -> bool:\n    try:\n        import private_gpt.components.vector_store.qdrant_client_builder  # noqa: F401\n        return True\n    except ImportError:\n        return False","typeGuard":null,"tryCatchPattern":"try:\n    factory.warm_up()\nexcept ImportError as e:\n    if \"vectorstore-qdrant\" in str(e):\n        # install the extra or switch vectorstore.database; do not retry as-is\n        raise","preventionTips":["Include --extra vectorstore-qdrant in install commands whenever qdrant is the configured database","Probe optional dependencies at startup and fail with the install hint","Keep deployment images and lockfiles in sync with configured providers"],"tags":["dependencies","optional-extra","qdrant","vector-store"],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}