{"record":{"id":"132b5b4c1727a316","repo":"stanford-oval/storm","slug":"please-provide-a-folder-path-132b5b","errorCode":null,"errorMessage":"Please provide a folder path.","messagePattern":"Please provide a folder path\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"knowledge_storm/utils.py","lineNumber":141,"sourceCode":"            return QdrantVectorStoreManager._check_create_collection(\n                client=client, collection_name=collection_name, model=model\n            )\n        except Exception as e:\n            raise ValueError(f\"Error occurs when connecting to the server: {e}\")\n\n    @staticmethod\n    def _init_offline_vector_db(\n        vector_store_path: str, collection_name: str, model: \"HuggingFaceEmbeddings\"\n    ):\n        from qdrant_client import QdrantClient\n\n        \"\"\"Initialize the Qdrant client that is connected to an offline vector store with the given vector store folder path.\n\n        Args:\n            vector_store_path (str): Path to the vector store.\n        \"\"\"\n        if vector_store_path is None:\n            raise ValueError(\"Please provide a folder path.\")\n\n        try:\n            client = QdrantClient(path=vector_store_path)\n            return QdrantVectorStoreManager._check_create_collection(\n                client=client, collection_name=collection_name, model=model\n            )\n        except Exception as e:\n            raise ValueError(f\"Error occurs when loading the vector store: {e}\")\n\n    @staticmethod\n    def create_or_update_vector_store(\n        collection_name: str,\n        vector_db_mode: str,\n        file_path: str,\n        content_column: str,\n        title_column: str = \"title\",\n        url_column: str = \"url\",\n        desc_column: str = \"description\",","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/stanford-oval/storm/blob/fb951af7744dab086e34962e9bc6fe878e145f83/knowledge_storm/utils.py#L123-L159","documentation":"Raised by QdrantVectorStoreManager._init_offline_vector_db when vector_store_path is None. The library requires an explicit filesystem folder path to open an offline (embedded) Qdrant store via QdrantClient(path=...). Without it there is no location to load or create the vector database.","triggerScenarios":"Calling create_or_update_vector_store(..., vector_db_mode='offline', vector_store_path=None), or omitting the vector_store_path argument while in offline mode.","commonSituations":"Defaulting vector_store_path to None in a wrapper script, copy-pasting an online-mode example and just flipping the mode string, or forgetting the CLI flag that supplies the path.","solutions":["Pass a valid folder path, e.g. vector_store_path='./qdrant_store'","If you meant to use a Qdrant server, set vector_db_mode='online' and provide url/api_key instead","Ensure the directory exists or is creatable and the process has write permissions"],"exampleFix":"# before\ncreate_or_update_vector_store(..., vector_db_mode='offline')\n# after\ncreate_or_update_vector_store(..., vector_db_mode='offline', vector_store_path='./qdrant_store')","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\nvector_store_path = './qdrant_store'\nif vector_db_mode == 'offline':\n    assert vector_store_path, 'vector_store_path required in offline mode'\n    p = Path(vector_store_path)\n    p.mkdir(parents=True, exist_ok=True)\n    assert os.access(p, os.W_OK), f'no write access to {p}'","typeGuard":"def is_offline_config(mode: str, path: str | None) -> bool:\n    return mode == 'offline' and isinstance(path, str) and len(path) > 0","tryCatchPattern":"try:\n    create_or_update_vector_store(..., vector_db_mode='offline', vector_store_path=p)\nexcept ValueError as e:\n    if 'folder path' in str(e):\n        raise SystemExit('Missing --vector-store-path for offline mode') from e\n    raise","preventionTips":["Require the vector-store path argument whenever offline mode is selected in your CLI","Centralize mode+path validation in one config-check function"],"tags":["qdrant","vector-store","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"}