HKUDS/DeepTutor · error · HTTPException

{OSError message}

Error message

{OSError message}

What it means

Error "{OSError message}" thrown in HKUDS/DeepTutor.

Source

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

        except OSError:
            continue
    return {"surface": surf, "removed_files": removed}


@router.delete("/trace/{surface}/day/{day}")
async def clear_trace_day(surface: str, day: str):
    surf = _validate_surface(surface)
    try:
        parsed = date_cls.fromisoformat(day)
    except ValueError:
        raise HTTPException(status_code=400, detail="day must be YYYY-MM-DD")
    path = paths.trace_file(surf, parsed)
    if not path.exists():
        raise HTTPException(status_code=404, detail="no trace for that day")
    try:
        path.unlink()
    except OSError as exc:
        raise HTTPException(status_code=500, detail=str(exc))
    return {"surface": surf, "day": day, "deleted": True}


# ── Snapshot (L1 workspace mirror) ───────────────────────────────────────


@router.get("/snapshot/{surface}")
async def get_snapshot(surface: str):
    """Return the current entity list for ``surface`` from workspace.

    Snapshot is always derived live from workspace at call time. The response
    also includes ``pending_changes`` — the diff vs the last persisted state.
    Refresh commits these pending changes into ``changes.jsonl``.
    """
    surf = _validate_surface(surface)
    from deeptutor.services.memory import snapshot as snap

    entities = snap.read_snapshot(surf)

View on GitHub (pinned to 3e82f13042)

When it happens

Trigger: Thrown at deeptutor/api/routers/memory.py:721 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/80bebbae91d88d8d. Report an issue: GitHub.