{"record":{"id":"f75644bd5a3a80ab","repo":"apache/beam","slug":"one-of-location-url-host-or-path-must-be-provided-for-qdrant","errorCode":null,"errorMessage":"One of location, url, host, or path must be provided for Qdrant","messagePattern":"One of location, url, host, or path must be provided for Qdrant","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/ml/rag/ingestion/qdrant.py","lineNumber":94,"sourceCode":"    **kwargs: Additional arguments passed directly into client initialization\n  \"\"\"\n\n  location: Optional[str] = None\n  url: Optional[str] = None\n  port: Optional[int] = 6333\n  grpc_port: int = 6334\n  prefer_grpc: bool = False\n  https: Optional[bool] = None\n  api_key: Optional[str] = None\n  prefix: Optional[str] = None\n  timeout: Optional[int] = None\n  host: Optional[str] = None\n  path: Optional[str] = None\n  kwargs: dict[str, Any] = field(default_factory=dict)\n\n  def __post_init__(self):\n    if not (self.location or self.url or self.host or self.path):\n      raise ValueError(\n          \"One of location, url, host, or path must be provided for Qdrant\")\n\n  @classmethod\n  def for_cloud(\n      cls,\n      url: str,\n      api_key: str,\n      *,\n      prefer_grpc: bool = False,\n      timeout: Optional[int] = None,\n      **kwargs: Any,\n  ) -> \"QdrantConnectionParameters\":\n    \"\"\"Connect to Qdrant Cloud. Requires the cluster URL and an API key.\"\"\"\n    return cls(\n        url=url,\n        api_key=api_key,\n        https=True,\n        prefer_grpc=prefer_grpc,","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/ml/rag/ingestion/qdrant.py#L76-L112","documentation":"QdrantVectorStoreConfig.__post_init__ validates that at least one connection target is set: location, url, host, or path. Without one, the Qdrant client cannot determine which server or local storage to connect to, so the dataclass refuses construction.","triggerScenarios":"Instantiating QdrantVectorStoreConfig() (or QdrantWriteParameters-style config wrapping it) with all of location, url, host, and path left as None — e.g. building the config dynamically from empty/missing settings dict values.","commonSituations":"Config values read from pipeline options or environment variables that were never set; copying a config example but deleting the connection fields; constructing the dataclass programmatically with defaults only.","solutions":["Set one connection field, e.g. QdrantVectorStoreConfig(url='https://xyz.cloud.qdrant.io:6333')","Use the for_cloud(url=..., api_key=...) classmethod for Qdrant Cloud clusters","Set host/port for a self-hosted instance, or path='/tmp/qdrant' for local embedded storage","Verify the pipeline options / config dict actually supply a connection value before constructing the config"],"exampleFix":"// before\nconfig = QdrantVectorStoreConfig()\n// after\nconfig = QdrantVectorStoreConfig(url=\"https://my-cluster.qdrant.io:6333\", api_key=api_key)","handlingStrategy":"validation","validationCode":"def assert_qdrant_target(config):\n    assert config.location or config.url or config.host or config.path, \\\n        \"Qdrant config needs location, url, host, or path\"","typeGuard":"def has_qdrant_target(cfg) -> bool:\n    return bool(cfg.location or cfg.url or cfg.host or cfg.path)","tryCatchPattern":null,"preventionTips":["Always construct Qdrant configs via for_cloud() or with an explicit url","Fail fast in pipeline option processing when connection settings are absent","Keep connection settings in one validated config object rather than scattered env vars"],"tags":["python","qdrant","configuration","vector-database"],"backgroundTag":"missing-required-config-field","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}