{"record":{"id":"c4eb606439390560","repo":"stanford-oval/storm","slug":"please-provide-a-url-for-the-qdrant-server-c4eb60","errorCode":null,"errorMessage":"Please provide a url for the Qdrant server.","messagePattern":"Please provide a url for the Qdrant server\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"knowledge_storm/utils.py","lineNumber":119,"sourceCode":"\n    @staticmethod\n    def _init_online_vector_db(\n        url: str, api_key: str, collection_name: str, model: \"HuggingFaceEmbeddings\"\n    ):\n        from qdrant_client import QdrantClient\n\n        \"\"\"Initialize the Qdrant client that is connected to an online vector store with the given URL and API key.\n\n        Args:\n            url (str): URL of the Qdrant server.\n            api_key (str): API key for the Qdrant server.\n        \"\"\"\n        if api_key is None:\n            if not os.getenv(\"QDRANT_API_KEY\"):\n                raise ValueError(\"Please provide an api key.\")\n            api_key = os.getenv(\"QDRANT_API_KEY\")\n        if url is None:\n            raise ValueError(\"Please provide a url for the Qdrant server.\")\n\n        try:\n            client = QdrantClient(url=url, api_key=api_key)\n            return QdrantVectorStoreManager._check_create_collection(\n                client=client, collection_name=collection_name, model=model\n            )\n        except Exception as e:\n            raise ValueError(f\"Error occurs when connecting to the server: {e}\")\n\n    @staticmethod\n    def _init_offline_vector_db(\n        vector_store_path: str, collection_name: str, model: \"HuggingFaceEmbeddings\"\n    ):\n        from qdrant_client import QdrantClient\n\n        \"\"\"Initialize the Qdrant client that is connected to an offline vector store with the given vector store folder path.\n\n        Args:","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/stanford-oval/storm/blob/fb951af7744dab086e34962e9bc6fe878e145f83/knowledge_storm/utils.py#L101-L137","documentation":"Raised by QdrantVectorStoreManager._init_online_vector_db when the url argument is None — there is no default or env fallback for it. Online mode needs an explicit Qdrant server endpoint (self-hosted URL or Qdrant Cloud URL) to build the QdrantClient, so the manager aborts immediately.","triggerScenarios":"Calling create_or_update_vector_store(..., online_mode=True) or _init_online_vector_db(api_key=..., url=None). Note the API-key check runs first, so the key must already be resolved for this error to surface.","commonSituations":"Developer sets QDRANT_API_KEY but forgets the URL entirely; passing arguments in the wrong order so url receives None; copy-paste from offline-mode examples that use a local path instead of a url; expecting a QDRANT_URL env fallback that doesn't exist in this code.","solutions":["Pass the server URL explicitly: create_or_update_vector_store(url=\"https://<cluster>.cloud.qdrant.io:6333\", online_mode=True, ...)","For a local server use url=\"http://localhost:6333\"","Double-check keyword-argument names/order — unlike the key, url has no environment-variable fallback"],"exampleFix":"# before\nstore = QdrantVectorStoreManager.create_or_update_vector_store(online_mode=True, api_key=KEY, model=model, collection_name=\"c\")\n\n# after\nstore = QdrantVectorStoreManager.create_or_update_vector_store(url=\"https://xyz.cloud.qdrant.io:6333\", online_mode=True, api_key=KEY, model=model, collection_name=\"c\")","handlingStrategy":"validation","validationCode":"def valid_qdrant_url(url):\n    return url is not None and url.startswith((\"http://\", \"https://\"))\n\nassert valid_qdrant_url(URL), \"url is required (no env fallback) for online mode\"","typeGuard":null,"tryCatchPattern":"try:\n    store = QdrantVectorStoreManager.create_or_update_vector_store(online_mode=True, api_key=K, model=m, collection_name=c)\nexcept ValueError as e:\n    if \"url\" in str(e):\n        raise SystemExit(\"Pass url= explicitly, e.g. https://<cluster>.cloud.qdrant.io:6333\")\n    raise","preventionTips":["Remember url has no env-var fallback unlike the API key","Use keyword arguments to avoid positional mix-ups","Default local dev URL to http://localhost:6333 explicitly"],"tags":["qdrant","configuration","missing-url","vector-db"],"backgroundTag":"missing-required-parameter","analyzedSha":"fb951af7744dab086e34962e9bc6fe878e145f83","analyzedAt":"2026-08-28T11:56:54.780Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}