You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When autograding a notebook with metadata errors, the error messages are not helpful and/or misleading.
Here is an example notebook with a duplicate grade_id:
from nbformat.v4 import new_notebook, new_markdown_cell
from nbgrader.preprocessors import CheckCellMetadata
from nbgrader.nbgraderformat import MetadataValidator
nb = new_notebook()
cell = new_markdown_cell(
metadata=dict(
nbgrader=dict(
grade_id="my_id",
grade=False,
solution=False,
locked=True,
schema_version=3
)
)
)
nb.cells.append(
cell
)
nb.cells.append(
cell
)
Now when the MetadataValidator is used to validate the notebook there is a descriptive error message that gives the correct information about the error:
AutogradeApp | ERROR] One or more notebooks in the assignment use an old version
of the nbgrader metadata format. Please **back up your class files
directory** and then update the metadata using:
nbgrader update .
nbgrader_version=0.9.3 and older
When autograding a notebook with metadata errors, the error messages are not helpful and/or misleading.
Here is an example notebook with a duplicate
grade_id
:Now when the
MetadataValidator
is used to validate the notebook there is a descriptive error message that gives the correct information about the error:Output:
When the
CheckCellMetadata
preprocessor is used the error is undescriptive:Output:
When autograding a notebook like this I actually get this misleading error originating from here: https://github.com/jupyter/nbgrader/blob/main/nbgrader/converters/base.py#L421
This might be related to #1629.
The text was updated successfully, but these errors were encountered: