stanford-oval/storm · error · ValueError

Please provide a collection name.

Error message

Please provide a collection name.

What it means

create_or_update_vector_store refuses to proceed when collection_name is None. The collection name identifies which Qdrant collection to create or update, so it is mandatory in all modes.

Source

Thrown at knowledge_storm/utils.py:195

        Args:
            collection_name: Name of the Qdrant collection.
            vector_store_path (str): Path to the directory where the vector store is stored or will be stored.
            vector_db_mode (str): Mode of the Qdrant vector store (offline or online).
            file_path (str): Path to the CSV file.
            content_column (str): Name of the column containing the content.
            title_column (str): Name of the column containing the title. Default is "title".
            url_column (str): Name of the column containing the URL. Default is "url".
            desc_column (str): Name of the column containing the description. Default is "description".
            batch_size (int): Batch size for adding documents to the collection.
            chunk_size: Size of each chunk if you need to build the vector store from documents.
            chunk_overlap: Overlap between chunks if you need to build the vector store from documents.
            embedding_model: Name of the Hugging Face embedding model.
            device: Device to run the embeddings model on, can be "mps", "cuda", "cpu".
            qdrant_api_key: API key for the Qdrant server (Only required if the Qdrant server is online).
        """
        # check if the collection name is provided
        if collection_name is None:
            raise ValueError("Please provide a collection name.")

        model_kwargs = {"device": device}
        encode_kwargs = {"normalize_embeddings": True}
        from langchain_huggingface import HuggingFaceEmbeddings

        model = HuggingFaceEmbeddings(
            model_name=embedding_model,
            model_kwargs=model_kwargs,
            encode_kwargs=encode_kwargs,
        )

        if file_path is None:
            raise ValueError("Please provide a file path.")
        # check if the file is a csv file
        if not file_path.endswith(".csv"):
            raise ValueError(f"Not valid file format. Please provide a csv file.")
        if content_column is None:
            raise ValueError("Please provide the name of the content column.")

View on GitHub (pinned to fb951af774)

Solutions

  1. Pass an explicit collection name, e.g. collection_name='my_corpus'
  2. Check that any variable used to build the name (config, env var, CLI arg) is populated before the call

Example fix

# before
create_or_update_vector_store(None, 'offline', 'data.csv', ...)
# after
create_or_update_vector_store('my_corpus', 'offline', 'data.csv', ...)
Defensive patterns

Strategy: validation

Validate before calling

collection_name = collection_name or os.environ.get('QDRANT_COLLECTION')
if not collection_name:
    raise SystemExit('collection_name is required (set QDRANT_COLLECTION or pass it explicitly)')

Type guard

def has_collection_name(name: str | None) -> bool:
    return isinstance(name, str) and bool(name.strip())

Try / catch

try:
    create_or_update_vector_store(collection_name, ...)
except ValueError as e:
    if 'collection name' in str(e):
        collection_name = prompt_for_name()
        create_or_update_vector_store(collection_name, ...)
    else:
        raise

Prevention

When it happens

Trigger: Calling create_or_update_vector_store(collection_name=None, ...) or omitting the argument when it has no default.

Common situations: Building the collection name dynamically from an env var or config that is unset, or refactoring a call site and dropping the first positional argument.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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