HKUDS/DeepTutor · error · FileNotFoundError
KB '{kb_name}' has no `raw/` directory; cannot reindex.
Error message
KB '{kb_name}' has no `raw/` directory; cannot reindex. What it means
Error "KB '{kb_name}' has no `raw/` directory; cannot reindex." thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/api/routers/knowledge.py:2790
async def run_reindex_task(kb_name: str, base_dir: str, task_id: str, signature_hash: str) -> None:
"""Re-index a KB's raw documents against the currently-active embedding config.
Each ``(profile, model, dimension, base_url)`` combination gets its own
flat ``<kb>/version-N/`` storage directory. Prior versions are preserved
untouched so switching the active embedding model back to a
previously-indexed one reuses the existing version with no extra work.
"""
task_manager = TaskIDManager.get_instance()
task_stream_manager = get_task_stream_manager()
task_stream_manager.ensure_task(task_id)
with capture_task_logs(task_id):
try:
base_path = Path(base_dir)
kb_dir = base_path / kb_name
raw_dir = kb_dir / "raw"
if not raw_dir.is_dir():
raise FileNotFoundError(f"KB '{kb_name}' has no `raw/` directory; cannot reindex.")
file_paths = [
str(path)
for path in FileTypeRouter.collect_supported_files(raw_dir, recursive=True)
]
if not file_paths:
raise ValueError(f"KB '{kb_name}' has no source files in `raw/` to reindex.")
_task_log(
task_id,
f"Re-indexing '{kb_name}' ({len(file_paths)} files) against signature {signature_hash}",
)
progress_tracker = ProgressTracker(kb_name, base_path)
progress_tracker.task_id = task_id
progress_tracker.update(
ProgressStage.PROCESSING_DOCUMENTS,
message_key="Re-indexing {{count}} document(s) with the active embedding model...",
message_params={"count": len(file_paths)},View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/api/routers/knowledge.py:2790 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/caf01c2dde4dae72.
Report an issue: GitHub.