HKUDS/DeepTutor · error · RuntimeError

Question extraction output not found

Error message

Question extraction output not found

What it means

Error "Question extraction output not found" thrown in HKUDS/DeepTutor.

Source

Thrown at deeptutor/agents/question/mimic_source.py:125

        # Shared parse layer: cached + engine-pluggable (the active engine is
        # selected in Settings → Document Parsing). Returns the cache dir with
        # the parsed artifacts; the questions JSON goes to the session output
        # dir so it never pollutes the shared parse cache.
        doc = get_parse_service().parse(paper_path, on_output=progress_callback)
        working_dir = doc.workdir or paper_path
        questions_dir = output_base

    json_files = list(questions_dir.glob("*_questions.json"))
    if not json_files:
        ok = extract_questions_from_paper(
            str(working_dir),
            output_dir=None if questions_dir == working_dir else str(questions_dir),
        )
        if not ok:
            raise RuntimeError("Failed to extract questions from parsed exam")
        json_files = list(questions_dir.glob("*_questions.json"))
    if not json_files:
        raise RuntimeError("Question extraction output not found")

    with json_files[0].open(encoding="utf-8") as fh:
        payload = json.load(fh)
    questions = payload.get("questions") or []
    if max_questions > 0:
        questions = questions[:max_questions]

    templates: list[QuizTemplate] = []
    for idx, item in enumerate(questions, 1):
        if not isinstance(item, dict):
            continue
        q_text = str(item.get("question_text") or "").strip()
        if not q_text:
            continue
        templates.append(
            QuizTemplate(
                question_id=f"q_{idx}",
                topic=q_text[:_TOPIC_CLIP_CHARS],

View on GitHub (pinned to 3e82f13042)

When it happens

Trigger: Thrown at deeptutor/agents/question/mimic_source.py:125 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/8c61d57541410791. Report an issue: GitHub.