HKUDS/DeepTutor · error · HTTPException
material {material_id!r} not found
Error message
material {material_id!r} not found What it means
Error "material {material_id!r} not found" thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/api/routers/reading.py:232
@router.get("/materials/{material_id}", response_model=MaterialDetail)
async def get_material(material_id: str) -> MaterialDetail:
store = _store()
try:
return _detail(store, store.manifest(material_id))
except Exception as exc:
raise _http_error(exc) from exc
@router.delete("/materials/{material_id}")
async def delete_material(material_id: str) -> dict[str, Any]:
store = _store()
try:
removed = store.delete(material_id)
except Exception as exc:
raise _http_error(exc) from exc
if not removed:
raise HTTPException(status_code=404, detail=f"material {material_id!r} not found")
return {"status": "ok", "material_id": material_id}
@router.get("/materials/{material_id}/units/{locator}", response_model=UnitText)
async def get_unit(material_id: str, locator: int) -> UnitText:
"""One unit's text — the reader's text view, and the only view for non-PDFs."""
store = _store()
try:
manifest = store.manifest(material_id)
return UnitText(
locator=locator,
unit=manifest.unit,
text=store.unit_text(material_id, locator),
)
except Exception as exc:
raise _http_error(exc) from exc
View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/api/routers/reading.py:232 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/10ff330bcfe94674.
Report an issue: GitHub.