{"record":{"id":"282fbc575c3105bb","repo":"stanford-oval/storm","slug":"please-provide-a-file-path","errorCode":null,"errorMessage":"Please provide a file path.","messagePattern":"Please provide a file path\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"knowledge_storm/utils.py","lineNumber":208,"sourceCode":"            device: Device to run the embeddings model on, can be \"mps\", \"cuda\", \"cpu\".\n            qdrant_api_key: API key for the Qdrant server (Only required if the Qdrant server is online).\n        \"\"\"\n        # check if the collection name is provided\n        if collection_name is None:\n            raise ValueError(\"Please provide a collection name.\")\n\n        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\":","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/stanford-oval/storm/blob/fb951af7744dab086e34962e9bc6fe878e145f83/knowledge_storm/utils.py#L190-L226","documentation":"Raised when file_path is None; the function ingests a CSV of documents and cannot continue without an input file.","triggerScenarios":"Calling create_or_update_vector_store with file_path=None or omitting it.","commonSituations":"Path built from user input or CLI flag that was never supplied, or an upstream download/generation step failed silently and passed None along.","solutions":["Provide the CSV path: file_path='data/my_docs.csv'","Validate path-producing variables (argparse results, downloads) for None before calling","Confirm the file exists at the given location"],"exampleFix":"# before\ncreate_or_update_vector_store('c', 'offline', None, 'content', 'url')\n# after\ncreate_or_update_vector_store('c', 'offline', 'data/docs.csv', 'content', 'url')","handlingStrategy":"validation","validationCode":"from pathlib import Path\nassert file_path, 'file_path is required'\nassert Path(file_path).is_file(), f'{file_path} does not exist'","typeGuard":"def is_valid_csv_path(p: str | None) -> bool:\n    return isinstance(p, str) and p.endswith('.csv') and Path(p).is_file()","tryCatchPattern":"try:\n    create_or_update_vector_store('c', mode, file_path, ...)\nexcept ValueError as e:\n    if 'file path' in str(e):\n        raise SystemExit('Missing input CSV path') from e\n    raise","preventionTips":["Check Path(file_path).is_file() before calling","Treat None from upstream download/generation steps as a hard failure"],"tags":["csv","missing-argument","file-path","validation"],"backgroundTag":"missing-required-argument","analyzedSha":"fb951af7744dab086e34962e9bc6fe878e145f83","analyzedAt":"2026-08-28T11:56:54.780Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}