HKUDS/DeepTutor · error · NoPendingInteractionError

No question is awaiting an answer

Error message

No question is awaiting an answer

What it means

Error "No question is awaiting an answer" thrown in HKUDS/DeepTutor.

Source

Thrown at deeptutor/learning/service.py:511

        second attempt.
        """

        def grade(tx):
            interaction = tx.get_interaction(question_id) if question_id else None
            if interaction is None and not question_id:
                interaction = tx.active_interaction()
            if interaction is None:
                legacy = self._interaction_from_legacy_pending(
                    tx.progress, session_id=session_id, turn_id=turn_id
                )
                if legacy is not None and (not question_id or legacy.interaction_id == question_id):
                    interaction = legacy
                    tx.put_interaction(interaction)
            if interaction is None:
                active = tx.active_interaction()
                if active is not None and question_id:
                    raise StaleInteractionError(question_id, active.interaction_id)
                raise NoPendingInteractionError("No question is awaiting an answer")
            if question_id and interaction.interaction_id != question_id:
                raise StaleInteractionError(question_id, interaction.interaction_id)
            if interaction.status == InteractionStatus.GRADED:
                return interaction, True
            if interaction.status == InteractionStatus.ABANDONED:
                raise NoPendingInteractionError("The question was abandoned")

            pending = interaction.question
            raw_answer = (
                interaction.user_answer
                if interaction.status == InteractionStatus.ANSWERED
                else str(answer or "")
            )
            if interaction.status == InteractionStatus.ANSWERED:
                if pending.question_type == "choice":
                    from deeptutor.learning.pending import (
                        has_option_bodies,
                        parse_options,

View on GitHub (pinned to 3e82f13042)

When it happens

Trigger: Thrown at deeptutor/learning/service.py:511 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/891b5f5846e08938. Report an issue: GitHub.