Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Fix extraction of 'kernelInfo' from the document -- fixes #3527#3701

Merged
jonsequitur merged 1 commit into
dotnet:mainfrom
pkese:fix-defaultKernelName
Oct 8, 2024
Merged

Fix extraction of 'kernelInfo' from the document -- fixes #3527#3701
jonsequitur merged 1 commit into
dotnet:mainfrom
pkese:fix-defaultKernelName

Conversation

@pkese

@pkese pkese commented Oct 7, 2024

Copy link
Copy Markdown
Contributor

This is a proposed fix for the #3527 -- it fixes the problem for me.

I wrote the code in a bit defensive manner, because I was not sure if the old code might still be correct in some cases (e.g. in case some .ipynb files are formatted in the way the code was initially written).
So I tried both options: if the old way doesn't work, then try the new structure format.

If all loaded documents are expected to be written in new format (metadata.polyglot_notebook.kernelInfo instead of metadata.kernelInfo),
then the left side of that 'or' (||) statement can be omitted.

@jonsequitur
jonsequitur merged commit 30b4f7e into dotnet:main Oct 8, 2024
@jonsequitur

Copy link
Copy Markdown
Contributor

Thanks, @pkese!

@colombod colombod added the bug Something isn't working label Oct 9, 2024
@jonsequitur jonsequitur removed the bug Something isn't working label Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants