dccsillag / magma-nvim

Interact with Jupyter from NeoVim.
GNU General Public License v3.0
988 stars 50 forks source link

[Bug] MagmaLoad fails if a cell didn't finish executing #31

Open Akulen opened 2 years ago

Akulen commented 2 years ago

I got this error while attempting to do a MagmaLoad:

Error detected while processing function Jupyter[8]..remote#define#CommandBootstrap[5]..remote#define#request: line    2:
[Magma] Error while doing Magma IO: Incorrect type for key 'execution_count': expected int, got NoneType

After checking the corresponding json, there was effectively a 'execution_count': null, and I managed to fix the issue by adding manually an unused number. My guess is that this was caused because I did a MagmaSave while a cell hadn't finished running, but I feel like this should not cause an error, and magma should be able to load information about a partially executed cell and display it as such.

dccsillag commented 2 years ago

Yup, good call. Will fix.