"New Random Seed" Can Break Things #44

Open
opened 1 month ago by hz · 0 comments
hz commented 1 month ago
Owner

Clicking "new random seed" can break things pretty badly if it's not followed up by a submission, presumably because it wasn't properly updated when the fixes for #5 went in. Here's an example error message:

ERROR:
  File "<CATSOOP ROOT>/dispatch.py", line 828, in main
    res = tutor.handle_page(context)
  File "<CATSOOP ROOT>/tutor.py", line 566, in handle_page
    result = h["handle"](context)
  File "<CATSOOP ROOT>/__HANDLERS__/default/default.py", line 124, in handle
    return mode_handlers.get(action, _unknown_handler(action))(context)
  File "<CATSOOP ROOT>/__HANDLERS__/default/default.py", line 421, in handle_view
    page += render_question(elt, context)
  File "<CATSOOP ROOT>/__HANDLERS__/default/default.py", line 1823, in render_question
    out += q["render_html"](last_processed, **args)
  File "<CATSOOP ROOT>/tutor.py", line 341, in _wrapped_func
    return orig(*args, **info)
  File "<DATA ROOT>/courses/fall22/__QTYPES__/mybigbox/mybigbox.py", line 46, in render_html
    out += ">%s</textarea><br>" % (escape(last_log.get(info["csq_name"], {'data': info["csq_initial"]})['data']))
TypeError: string indices must be integers

It may be worth checking whether "Save" can break things in a similar way, since I vaguely remember receiving a report like that.

Clicking "new random seed" can break things pretty badly if it's not followed up by a submission, presumably because it wasn't properly updated when the fixes for #5 went in. Here's an example error message: ``` ERROR: File "<CATSOOP ROOT>/dispatch.py", line 828, in main res = tutor.handle_page(context) File "<CATSOOP ROOT>/tutor.py", line 566, in handle_page result = h["handle"](context) File "<CATSOOP ROOT>/__HANDLERS__/default/default.py", line 124, in handle return mode_handlers.get(action, _unknown_handler(action))(context) File "<CATSOOP ROOT>/__HANDLERS__/default/default.py", line 421, in handle_view page += render_question(elt, context) File "<CATSOOP ROOT>/__HANDLERS__/default/default.py", line 1823, in render_question out += q["render_html"](last_processed, **args) File "<CATSOOP ROOT>/tutor.py", line 341, in _wrapped_func return orig(*args, **info) File "<DATA ROOT>/courses/fall22/__QTYPES__/mybigbox/mybigbox.py", line 46, in render_html out += ">%s</textarea><br>" % (escape(last_log.get(info["csq_name"], {'data': info["csq_initial"]})['data'])) TypeError: string indices must be integers ``` It may be worth checking whether "Save" can break things in a similar way, since I vaguely remember receiving a report like that.
hz added the bug beginner-friendly labels 1 month ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: catsoop/catsoop#44
Loading…
There is no content yet.