
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Observed behavior
PerseusExerciseGenerator._process_input_answers keeps any answer whose extract_value(...) is truthy. extract_value("1e400") is inf (-1e400 → -inf; a 401-digit integer → inf; an inf/inf fraction → nan), so the perseus/input_question.json template renders "value": inf.
This applies to legacy INPUT_QUESTION items. #6231 gates native QTI text-entry items out of derivation but does not touch this path.
Errors and logs
json.loads on the rendered item raises JSONDecodeError.
Expected behavior
Non-finite answers are dropped, like other unparseable answers, so the item JSON is valid.
User-facing consequences
Older Kolibri cannot load the item JSON, so learners get no exercise for the node.
Steps to reproduce
- Build an
INPUT_QUESTION item with answer "1e400".
- Run
_process_input_answers, then render_to_string("perseus/input_question.json", ...).
json.loads on the output fails on "value": inf.
Context
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Observed behavior
PerseusExerciseGenerator._process_input_answerskeeps any answer whoseextract_value(...)is truthy.extract_value("1e400")isinf(-1e400→-inf; a 401-digit integer →inf; aninf/inffraction →nan), so theperseus/input_question.jsontemplate renders"value": inf.This applies to legacy
INPUT_QUESTIONitems. #6231 gates native QTI text-entry items out of derivation but does not touch this path.Errors and logs
json.loadson the rendered item raisesJSONDecodeError.Expected behavior
Non-finite answers are dropped, like other unparseable answers, so the item JSON is valid.
User-facing consequences
Older Kolibri cannot load the item JSON, so learners get no exercise for the node.
Steps to reproduce
INPUT_QUESTIONitem with answer"1e400"._process_input_answers, thenrender_to_string("perseus/input_question.json", ...).json.loadson the output fails on"value": inf.Context
extract_value#6228