{"record":{"id":"e1bd651804258de3","repo":"stanford-oval/storm","slug":"please-provide-the-name-of-the-url-column","errorCode":null,"errorMessage":"Please provide the name of the url column.","messagePattern":"Please provide the name of the url column\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"knowledge_storm/utils.py","lineNumber":215,"sourceCode":"        model_kwargs = {\"device\": device}\n        encode_kwargs = {\"normalize_embeddings\": True}\n        from langchain_huggingface import HuggingFaceEmbeddings\n\n        model = HuggingFaceEmbeddings(\n            model_name=embedding_model,\n            model_kwargs=model_kwargs,\n            encode_kwargs=encode_kwargs,\n        )\n\n        if file_path is None:\n            raise ValueError(\"Please provide a file path.\")\n        # check if the file is a csv file\n        if not file_path.endswith(\".csv\"):\n            raise ValueError(f\"Not valid file format. Please provide a csv file.\")\n        if content_column is None:\n            raise ValueError(\"Please provide the name of the content column.\")\n        if url_column is None:\n            raise ValueError(\"Please provide the name of the url column.\")\n\n        # try to initialize the Qdrant client\n        qdrant = None\n        if vector_db_mode == \"online\":\n            qdrant = QdrantVectorStoreManager._init_online_vector_db(\n                url=url,\n                api_key=qdrant_api_key,\n                collection_name=collection_name,\n                model=model,\n            )\n        elif vector_db_mode == \"offline\":\n            qdrant = QdrantVectorStoreManager._init_offline_vector_db(\n                vector_store_path=vector_store_path,\n                collection_name=collection_name,\n                model=model,\n            )\n        else:\n            raise ValueError(","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/stanford-oval/storm/blob/fb951af7744dab086e34962e9bc6fe878e145f83/knowledge_storm/utils.py#L197-L233","documentation":"url_column is None; each ingested document stores a source URL from this column, so the function rejects the call before touching the vector DB.","triggerScenarios":"Calling create_or_update_vector_store without url_column or with url_column=None.","commonSituations":"Corpus without obvious URL field so the caller skips it, or the CSV uses a different header like 'link'/'source' and the argument was never updated.","solutions":["Pass the exact header of the URL column, e.g. url_column='url'","If the CSV has no URL column, add one (even a synthetic identifier) before ingestion","Verify header spelling against df.columns"],"exampleFix":"# before\ncreate_or_update_vector_store('c', 'offline', 'd.csv', 'content', None)\n# after\ncreate_or_update_vector_store('c', 'offline', 'd.csv', 'content', 'url')","handlingStrategy":"validation","validationCode":"import pandas as pd\ncols = pd.read_csv(file_path, nrows=0).columns.tolist()\nassert url_column in cols, f'{url_column} not in {cols}'","typeGuard":"def has_url_column(csv_path: str, col: str) -> bool:\n    import pandas as pd\n    return col in pd.read_csv(csv_path, nrows=0).columns","tryCatchPattern":"try:\n    create_or_update_vector_store('c', mode, f, content_column, url_column, ...)\nexcept ValueError as e:\n    if 'url column' in str(e):\n        raise SystemExit(f'Missing URL column; available: {pd.read_csv(f, nrows=0).columns.tolist()}') from e\n    raise","preventionTips":["Add a url column (even synthetic ids) when preparing corpora without links","Validate both column names against the CSV header before ingestion"],"tags":["csv","column-name","missing-argument","validation"],"backgroundTag":"missing-required-argument","analyzedSha":"fb951af7744dab086e34962e9bc6fe878e145f83","analyzedAt":"2026-08-28T11:56:54.780Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}