HKUDS/DeepTutor · error · HTTPException
Mastery path changed activity while the operation was starti
Error message
Mastery path changed activity while the operation was starting; active session: {exc.lease.session_id} What it means
Error "Mastery path changed activity while the operation was starting; active session: {exc.lease.session_id}" thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/api/routers/mastery_path.py:127
@asynccontextmanager
async def _exclusive_path_mutation(book_id: str):
"""Cancel the tutor, then exclude a newly racing tutor/API write."""
from deeptutor.learning.storage import PathLeaseConflictError
await _cancel_active_learning_turn(book_id)
store = LearningStore()
operation_id = f"api-{uuid.uuid4().hex}"
try:
await asyncio.to_thread(
store.acquire_path_lease,
book_id,
"__path_api__",
operation_id,
bind_session=False,
)
except PathLeaseConflictError as exc:
raise HTTPException(
status_code=409,
detail=(
"Mastery path changed activity while the operation was starting; "
f"active session: {exc.lease.session_id}"
),
) from exc
try:
yield
finally:
await asyncio.to_thread(
store.release_path_lease,
book_id,
turn_id=operation_id,
)
# ── Request models ───────────────────────────────────────────────────────────
View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/api/routers/mastery_path.py:127 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/f37f69630cdc5d92.
Report an issue: GitHub.