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

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

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

pkese
Copy link
Contributor

@pkese pkese commented Oct 7, 2024

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
4 checks passed
@jonsequitur
Copy link
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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants