HKUDS/DeepTutor · error · HTTPException
annotation not found
Error message
annotation not found
What it means
Error "annotation not found" thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/api/routers/reading.py:301
async def save_annotation(material_id: str, payload: AnnotationPayload) -> AnnotationInfo:
"""Create or update one annotation (id absent = create)."""
store = _store()
try:
saved = store.save_annotation(material_id, payload.to_annotation())
except Exception as exc:
raise _http_error(exc) from exc
return _annotation_info(saved)
@router.delete("/materials/{material_id}/annotations/{annotation_id}")
async def delete_annotation(material_id: str, annotation_id: str) -> dict[str, Any]:
store = _store()
try:
removed = store.delete_annotation(material_id, annotation_id)
except Exception as exc:
raise _http_error(exc) from exc
if not removed:
raise HTTPException(status_code=404, detail="annotation not found")
return {"status": "ok", "annotation_id": annotation_id}
@router.get("/materials/{material_id}/export")
async def export(
material_id: str,
fmt: Literal["auto", "pdf", "markdown"] = Query("auto"),
) -> Response:
"""Download the material with its annotations applied.
``pdf`` writes real PDF annotations into a copy of the original, so the
export keeps working outside DeepTutor; ``markdown`` returns the marks as
text, which is what every non-PDF format gets.
"""
store = _store()
try:
result = export_material(store, material_id, fmt=fmt)
except Exception as exc:View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/api/routers/reading.py:301 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/2d2e38aac111e3c7.
Report an issue: GitHub.