HKUDS/DeepTutor · error · HTTPException

reset failed

Error message

reset failed: {exc}

What it means

Server-side failure during reset_doc's cleanup: unlinking the doc's .md file or its meta sidecar raised an OSError (permissions, read-only filesystem, file locked by another process), and the message reports which removals succeeded before the failure.

Solutions

  1. Inspect the OSError text to see whether the doc, the meta sidecar, or both failed to unlink
  2. Fix filesystem permissions or free the file handle (e.g. a running consolidator) and retry the reset
  3. If the doc was removed but meta remains, rerun reset to clean up the leftover sidecar
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at deeptutor/api/routers/memory.py:211 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/0a64113d22b68437. Report an issue: GitHub.

Appendix: source

Thrown at deeptutor/api/routers/memory.py:211

    doc_path = paths.l2_file(key) if lyr == "L2" else paths.l3_file(key)  # type: ignore[arg-type]
    meta_path = (
        meta_mod.l2_meta_path(key)  # type: ignore[arg-type]
        if lyr == "L2"
        else meta_mod.l3_meta_path(key)  # type: ignore[arg-type]
    )

    removed_doc = False
    removed_meta = False
    try:
        if doc_path.exists():
            doc_path.unlink()
            removed_doc = True
        if meta_path.exists():
            meta_path.unlink()
            removed_meta = True
    except OSError as exc:
        raise HTTPException(status_code=500, detail=f"reset failed: {exc}") from exc

    return {
        "layer": lyr,
        "key": key,
        "reset": True,
        "removed_doc": removed_doc,
        "removed_meta": removed_meta,
    }


# ── Doc update (SSE-streamed consolidator) ───────────────────────────────


class LLMSelectionPayload(BaseModel):
    profile_id: str
    model_id: str

View on GitHub (pinned to 3e82f13042)