HKUDS/DeepTutor · error · HTTPException
Invalid capture status: {raw}
Error message
Invalid capture status: {raw} What it means
Error "Invalid capture status: {raw}" thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/api/routers/book.py:185
payload = "|".join(
[
book_id,
page_id,
block_id,
locator,
_normalize_capture_text(text),
],
).encode("utf-8")
return hashlib.sha256(payload).hexdigest()
def _coerce_capture_status(raw: str | None) -> LearningCaptureStatus | None:
if raw is None:
return None
try:
return LearningCaptureStatus(raw)
except ValueError as exc:
raise HTTPException(
status_code=400,
detail=f"Invalid capture status: {raw}",
) from exc
_CAPTURE_TRANSITIONS: dict[LearningCaptureStatus, set[LearningCaptureStatus]] = {
LearningCaptureStatus.CAPTURED: {
LearningCaptureStatus.CAPTURED,
LearningCaptureStatus.DRAFTED,
LearningCaptureStatus.PENDING_CONFIRMATION,
LearningCaptureStatus.APPROVED,
LearningCaptureStatus.REJECTED,
},
LearningCaptureStatus.DRAFTED: {
LearningCaptureStatus.DRAFTED,
LearningCaptureStatus.PENDING_CONFIRMATION,
LearningCaptureStatus.APPROVED,
LearningCaptureStatus.REJECTED,View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/api/routers/book.py:185 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/7865b8017c2490c7.
Report an issue: GitHub.