stanford-oval/storm · error · ValueError

Please provide a url for the Qdrant server.

Error message

Please provide a url for the Qdrant server.

What it means

init_online_vector_db requires a url for the Qdrant server; there is no environment fallback for it, unlike the API key. Passing url=None (the default when omitted) raises ValueError immediately.

Source

Thrown at knowledge_storm/rm.py:265

                f"Collection {self.collection_name} does not exist. Please create the collection first."
            )

    def init_online_vector_db(self, url: str, api_key: str):
        from qdrant_client import QdrantClient

        """
        Initialize the Qdrant client that is connected to an online vector store with the given URL and API key.

        Args:
            url (str): URL of the Qdrant server.
            api_key (str): API key for the Qdrant server.
        """
        if api_key is None:
            if not os.getenv("QDRANT_API_KEY"):
                raise ValueError("Please provide an api key.")
            api_key = os.getenv("QDRANT_API_KEY")
        if url is None:
            raise ValueError("Please provide a url for the Qdrant server.")

        try:
            self.client = QdrantClient(url=url, api_key=api_key)
            self._check_collection()
        except Exception as e:
            raise ValueError(f"Error occurs when connecting to the server: {e}")

    def init_offline_vector_db(self, vector_store_path: str):
        from qdrant_client import QdrantClient

        """
        Initialize the Qdrant client that is connected to an offline vector store with the given vector store folder path.

        Args:
            vector_store_path (str): Path to the vector store.
        """
        if vector_store_path is None:
            raise ValueError("Please provide a folder path.")

View on GitHub (pinned to fb951af774)

Solutions

  1. Pass the url explicitly, e.g. url='https://<cluster>.eu-central.aws.cloud.qdrant.io:6333'
  2. Get the exact URL from the Qdrant Cloud dashboard for your cluster
  3. If you want env-based config, read it yourself: url=os.environ['QDRANT_URL']

Example fix

// before
rm.init_online_vector_db(api_key=os.environ['QDRANT_API_KEY'])
// after
rm.init_online_vector_db(url='https://xyz.cloud.qdrant.io:6333', api_key=os.environ['QDRANT_API_KEY'])
Defensive patterns

Strategy: validation

Validate before calling

QDRANT_URL = 'https://xyz.cloud.qdrant.io:6333'
if not QDRANT_URL:
    raise SystemExit('url is required for init_online_vector_db')
rm.init_online_vector_db(url=QDRANT_URL, api_key=os.environ['QDRANT_API_KEY'])

Type guard

def valid_qdrant_url(url: str | None) -> bool:
    return isinstance(url, str) and url.startswith(('http://', 'https://'))

Try / catch

try:
    rm.init_online_vector_db(url=url, api_key=key)
except ValueError as e:
    if 'url' in str(e):
        raise SystemExit('Provide the Qdrant cluster URL from the cloud dashboard')
    raise

Prevention

When it happens

Trigger: Calling rm.init_online_vector_db(api_key='...') with no url; calling rm.init_online_vector_db() with both url and api_key relying solely on QDRANT_API_KEY env var (url still missing).

Common situations: Assuming url also has an env-var fallback like QDRANT_URL; argument-order mistakes (passing api_key positionally into url); copied examples trimmed down to only the key.

Understand the failure class

Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.

Related errors


AI-assisted analysis of stanford-oval/storm@fb951af774 (2026-08-28). Data as JSON: /api/errors/a553365570805243. Report an issue: GitHub.