HKUDS/DeepTutor · error · PathBindingError
Mastery path {target!r} is being tutored in another conversa
Error message
Mastery path {target!r} is being tutored in another conversation right now (session {exc.lease.session_id!r}). Try again once that turn finishes. What it means
Error "Mastery path {target!r} is being tutored in another conversation right now (session {exc.lease.session_id!r}). Try again once that turn finishes." thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/capabilities/mastery/binding.py:80
if require_existing and not await asyncio.to_thread(store.exists, target):
raise PathBindingError(
f"No mastery path {path_id!r} exists. Call mastery_paths for the "
"ids you can switch to, or mastery_build to create one here."
)
# One lease row per turn: the old one has to go before the new one can be
# taken, and both are scoped to this turn so a concurrent conversation on
# either path is never disturbed.
released = await asyncio.to_thread(store.release_leases_for_turn, turn_id)
try:
await asyncio.to_thread(store.acquire_path_lease, target, session_id, turn_id)
except PathLeaseConflictError as exc:
# Put the learner back where they were rather than stranding the turn
# with no lease at all.
if released and released != target:
with contextlib.suppress(Exception):
await asyncio.to_thread(store.acquire_path_lease, released, session_id, turn_id)
raise PathBindingError(
f"Mastery path {target!r} is being tutored in another conversation "
f"right now (session {exc.lease.session_id!r}). Try again once that "
"turn finishes."
) from exc
_apply(bind_turn, target)
await _remember_on_session(session_id, target)
return target
async def leave_active_path(
*,
session_id: str,
turn_id: str,
bind_turn: PathBinder | None,
) -> str:
"""Detach the conversation from any named path.
View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/capabilities/mastery/binding.py:80 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/0c1d4833bee4bfef.
Report an issue: GitHub.