stanford-oval/storm · error · ValueError

Please provide the name of the content column.

Error message

Please provide the name of the content column.

What it means

content_column is None; the function needs to know which CSV column holds document text to build the documents and metadata for embedding.

Solutions

  1. Pass the exact header name of the text column, e.g. content_column='content'
  2. Print df.columns first to confirm the header spelling
  3. If the column is missing from the CSV, regenerate the CSV with the expected header

Example fix

# before
create_or_update_vector_store('c', 'offline', 'd.csv', None, 'url')
# after
create_or_update_vector_store('c', 'offline', 'd.csv', 'content', 'url')
Defensive patterns

Strategy: validation

Validate before calling

import pandas as pd
cols = pd.read_csv(file_path, nrows=0).columns.tolist()
assert content_column in cols, f'{content_column} not in {cols}'

Type guard

def has_column(csv_path: str, col: str) -> bool:
    import pandas as pd
    return col in pd.read_csv(csv_path, nrows=0).columns

Try / catch

try:
    create_or_update_vector_store('c', mode, f, content_column, url_column, ...)
except ValueError as e:
    if 'Content column' in str(e):
        show_available_columns(f)
        raise
    raise

Prevention

When it happens

Trigger: Calling create_or_update_vector_store without content_column, or with it set to None via a config dict.

Common situations: CSV header renamed by a data vendor (e.g. 'text' vs 'body'), or the column name is parameterized and the default was removed during refactor.

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

Appendix: source

Thrown at knowledge_storm/utils.py:213

            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.")
        if url_column is None:
            raise ValueError("Please provide the name of the url column.")

        # try to initialize the Qdrant client
        qdrant = None
        if vector_db_mode == "online":
            qdrant = QdrantVectorStoreManager._init_online_vector_db(
                url=url,
                api_key=qdrant_api_key,
                collection_name=collection_name,
                model=model,
            )
        elif vector_db_mode == "offline":
            qdrant = QdrantVectorStoreManager._init_offline_vector_db(
                vector_store_path=vector_store_path,
                collection_name=collection_name,
                model=model,
            )

View on GitHub (pinned to fb951af774)