Skip to content

fix: Allow null kernelspec in OverwriteKernelspec #1962

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shreve
Copy link
Contributor

@shreve shreve commented Apr 28, 2025

The Notebook.kernelspec field is nullable, so in the event of a null value, OverwriteKernelspec should not fail. This commit checks for that case before trying to json.loads the value.

Copy link
Contributor

Binder 👈 Launch a Binder on branch shreve/nbgrader/overwrite-kernelspec

@shreve shreve force-pushed the overwrite-kernelspec branch 2 times, most recently from 2d9a992 to c3c07e5 Compare April 28, 2025 18:43
The `Notebook.kernelspec` field is nullable, so in the event of a null
value, OverwriteKernelspec should not fail. This commit checks for that
case before trying to `json.loads` the value.
@shreve shreve force-pushed the overwrite-kernelspec branch from c3c07e5 to 47992d0 Compare April 28, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant