stanford-oval/storm · error · ValueError

Please provide a folder path.

Error message

Please provide a folder path.

What it means

For source='offline', VectorRM.init_offline_vector_db requires the filesystem path of a pre-built local Qdrant store. Passing vector_store_path=None — note this is the method parameter, distinct from the similarly named constructor argument — raises ValueError before QdrantClient(path=...) is attempted.

Source

Thrown at knowledge_storm/rm.py:283

            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.")

        try:
            self.client = QdrantClient(path=vector_store_path)
            self._check_collection()
        except Exception as e:
            raise ValueError(f"Error occurs when loading the vector store: {e}")

    def get_usage_and_reset(self):
        usage = self.usage
        self.usage = 0

        return {"VectorRM": usage}

    def get_vector_count(self):
        """
        Get the count of vectors in the collection.

        Returns:

View on GitHub (pinned to fb951af774)

Solutions

  1. Pass the path to the init method: rm.init_offline_vector_db('./qdrant_store')
  2. Pass the same path in both places if your framework requires constructing VectorRM with it
  3. Ensure the directory exists and contains a Qdrant store created with QdrantClient(path=...)

Example fix

// before
rm = VectorRM(collection_name='docs', source='offline', vector_store_path='./qdrant', embedding_model='...')
rm.init_offline_vector_db()  # missing path
// after
rm = VectorRM(collection_name='docs', source='offline', vector_store_path='./qdrant', embedding_model='...')
rm.init_offline_vector_db('./qdrant')
Defensive patterns

Strategy: validation

Validate before calling

import os
STORE = os.path.abspath('./qdrant')
if not STORE:
    raise SystemExit('vector_store_path is required for init_offline_vector_db')
rm.init_offline_vector_db(STORE)

Type guard

def valid_store_path(p: str | None) -> bool:
    import os
    return isinstance(p, str) and bool(p.strip()) and os.path.isdir(p)

Try / catch

try:
    rm.init_offline_vector_db(store_path)
except ValueError as e:
    if 'folder path' in str(e):
        raise SystemExit('Pass the store path to init_offline_vector_db, not only the constructor')
    raise

Prevention

When it happens

Trigger: Calling rm.init_offline_vector_db() with no argument because the constructor already took vector_store_path and the developer assumed it would be reused; explicitly passing None.

Common situations: Confusion between the constructor's vector_store_path kwarg and the init method's parameter of the same name; refactors that pass the path only at construction.

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/e36c40f5dc9a49ee. Report an issue: GitHub.