HKUDS/DeepTutor · error · HTTPException
Quiz results are required
Error message
Quiz results are required
What it means
Error "Quiz results are required" thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/api/routers/sessions.py:215
if result["was_running"]:
raise HTTPException(
status_code=409, detail="Cannot delete a message while its turn is running"
)
if not result["deleted"]:
raise HTTPException(status_code=404, detail="Message not found")
attachment_store = get_attachment_store()
for aid in result["attachment_ids"]:
try:
await attachment_store.delete_attachment(session_id, aid)
except Exception:
logger.exception("failed to delete attachment %s for session %s", aid, session_id)
return result
@router.post("/{session_id}/quiz-results")
async def record_quiz_results(session_id: str, payload: QuizResultsRequest):
if not payload.answers:
raise HTTPException(status_code=400, detail="Quiz results are required")
store = get_sqlite_session_store()
session = await store.get_session(session_id)
if session is None:
raise HTTPException(status_code=404, detail="Session not found")
content = _format_quiz_results_message(payload.answers)
await store.add_message(
session_id=session_id,
role="user",
content=content,
capability="deep_question",
)
notebook_count = 0
try:
notebook_count = await store.upsert_notebook_entries(
session_id,
[{**item.model_dump(), "turn_id": payload.turn_id} for item in payload.answers],
)
except Exception:View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/api/routers/sessions.py:215 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/6d5dbbd46768a193.
Report an issue: GitHub.