HKUDS/DeepTutor · error · ValueError

KB '{kb_name}' has no source files in `raw/` to reindex.

Error message

KB '{kb_name}' has no source files in `raw/` to reindex.

What it means

Error "KB '{kb_name}' has no source files in `raw/` to reindex." thrown in HKUDS/DeepTutor.

Source

Thrown at deeptutor/api/routers/knowledge.py:2796

    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)},
                current=0,
                total=len(file_paths),
            )

            from deeptutor.services.rag.service import RAGService

View on GitHub (pinned to 3e82f13042)

When it happens

Trigger: Thrown at deeptutor/api/routers/knowledge.py:2796 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/172b87bfbc48d809. Report an issue: GitHub.