Skip to content

Validate button shows incomprehensible SyntaxError when the solution trips the timeout limit #1846

Open
@lahwaacz

Description

@lahwaacz

Operating system

Arch Linux

nbgrader --version

Python version 3.11.5 (main, Sep  2 2023, 14:16:33) [GCC 13.2.1 20230801]
nbgrader version 0.9.1

jupyterhub --version (if used with JupyterHub)

4.0.2

jupyter notebook --version

7.0.6

Expected behavior

Nbgrader should not display a SyntaxError when some internal operation fails.

Actual behavior

When a student tries to validate an assignment that gets stuck due to infinite loop, Nbgrader shows this error:

Validation failed
Cannot validate: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

screenshot-2023-11-22@12:08:02

Steps to reproduce the behavior

Create an assignment with an infinite loop and click on "Validate":

while True:
    pass

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions