HKUDS/DeepTutor · error · MasteryInteractionError
Unknown objective ; refresh mastery_status
Error message
Unknown objective {pending.knowledge_point_id!r}; refresh mastery_status What it means
In register(), the pending interaction's knowledge_point_id has no match among the knowledge points of any module in the learner's stored progress — the mastery tree is out of sync with the objective being registered. The message itself instructs refreshing mastery_status.
Solutions
- Recompute/refresh mastery_status so the objective list matches the book's current knowledge points
- Verify the knowledge_point_id spelling against the mastery tree
- Regenerate the learning path if the book's objectives changed
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at deeptutor/learning/service.py:357 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/46952e3626a5861c.
Report an issue: GitHub.
Appendix: source
Thrown at deeptutor/learning/service.py:357
active = None
elif persisted is not None:
active = persisted
else:
tx.put_interaction(active)
if active is not None:
return active, False
known_kp = next(
(
kp
for module in tx.progress.modules
for kp in module.knowledge_points
if kp.id == pending.knowledge_point_id
),
None,
)
if known_kp is None:
raise MasteryInteractionError(
f"Unknown objective {pending.knowledge_point_id!r}; refresh mastery_status"
)
interaction = MasteryInteraction(
interaction_id=pending.question_id,
path_id=book_id,
question=pending,
status=InteractionStatus.REGISTERED,
session_id=session_id,
turn_id=turn_id,
)
tx.progress.pending_question = pending
tx.put_interaction(interaction)
from deeptutor.learning.pending import public_pending_question
tx.emit(
"interaction.registered",
{View on GitHub (pinned to 3e82f13042)