Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Notebook validation failed" message in Jupyter Notebook #340

Closed
spring-haru opened this issue Aug 26, 2021 · 3 comments · Fixed by #344
Closed

"Notebook validation failed" message in Jupyter Notebook #340

spring-haru opened this issue Aug 26, 2021 · 3 comments · Fixed by #344
Labels
bug Something isn't working
Milestone

Comments

@spring-haru
Copy link

Describe the bug
Opening a student version of assign-full-example-v1.ipynb created using a file at the following url

https://github.com/ucbds-infra/otter-grader/blob/master/docs/_static/notebooks/assign-full-example-v1.ipynb

generates the following "Notebook validation failed" message in Jupyter Notebook.

BTW, it is the file mentioned at https://otter-grader.readthedocs.io/en/latest/otter_assign/v1/notebook_format.html#sample-notebook

The save operation succeeded, but the notebook does not appear to be valid. The validation error was:

Notebook validation failed: Additional properties are not allowed ('id' was unexpected):
{
 "metadata": {
  "deletable": false,
  "editable": false,
  "trusted": false
 },
 "id": "hungarian-region",
 "cell_type": "code",
 "source": "# Initialize Otter\nimport otter\ngrader = otter.Notebook(\"assign-full-example-v1.ipynb\")",
 "execution_count": null,
 "outputs": []
}

To Reproduce
Steps to reproduce the behavior:

  1. Place assign-full-example-v1.ipynb in a given folder, download from the above link.
  2. cd into the folder
  3. otter assign assign-full-example-v1.ipynb dist --v1 in a shell
  4. Open assign-full-example-v1.ipynb in dist/student in Jupyter Notebook.

Expected behavior
No such message.

Versions
Otter 3.0.3

Additional context
macOS Big Sur
Am I missing something?

@spring-haru spring-haru added the bug Something isn't working label Aug 26, 2021
@chrispyles
Copy link
Member

What version of Jupyter notebook do you have installed? This error is caused by a mismatched version of nbformat and notebook. Cell IDs were added to the notebook format in nbformat 5.1.0 but I don't think that the notebook front-end supported them until notebook 6.4.0.

@spring-haru
Copy link
Author

After your response, I created a new environment with

nbformat 5.1.3
notebook 6.4.3

but the "failed" message still persists.

@chrispyles
Copy link
Member

@spring-haru I've opened #344 which implements a fix for this issue. It will be included in v3.0.4, to be release tonight/tomorrow morning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants