dccsillag / magma-nvim

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

[Bug] MagmaInit fails after choosing kernel #26

Closed HagaiHargil closed 1 year ago

HagaiHargil commented 2 years ago

Describe the bug Thanks for your work on this exciting plugin!

When initializing :MagmaInit and choosing the kernel (python3) I immediately receive the following error:

Error detected while processing function MagmaUpdateInterface[1]..remote#define#request:
line    2:
Error invoking '/root/.local/share/nvim/site/pack/packer/start/magma-nvim/rplugin/python3/magma:function:MagmaUpdateInterface' on channel 11 (python3-rplugin-host):
ch 11 was closed by the client

The actual value of the channel changes between runs, but the error is the same. Once I press enter it starts repeating this message everytime I try to do anything:

Error detected while processing function MagmaTick[1]..remote#define#request:
line    2:
Error invoking '/root/.local/share/nvim/site/pack/packer/start/magma-nvim/rplugin/python3/magma:function:MagmaTick' on channel 11 (python3-rplugin-host):
Invalid channel: 11

which renders my nvim instance useless.

FWIW :checkhealth reports that everything is fine (before the init, of course).

Desktop (please complete the following information):

dccsillag commented 2 years ago

Are you on Neovim nightly? Maybe try updating it?

Also check that something like :python3 print("a+b") works (regardless of what :checkhealth says).

HagaiHargil commented 2 years ago

I am on nightly - it was already quite a recent version, and upgrading to the latest build didn't help.

That print command does work, BTW.

I might try to revert to 0.5.1 if there's nothing else to do.

dccsillag commented 2 years ago

Could you try in 0.5.1? (You can just download the release and run Neovim from there.)

I mean, there probably is something to do, but I'd like to make sure that it's our fault first. A channel disappearing is very weird, even more so since magma-nvim doesn't even mention them (just uses one via pynvim).

Also check that your pynvim is up to date.

HagaiHargil commented 2 years ago

OK, it's still the case with 0.5.1. In all cases I'm using the AppImage installation, BTW. My pynvim is the latest (0.4.3).

dccsillag commented 2 years ago

Okay, so the issue is not on the Neovim side. Thank you.

I'll ponder a bit on what it could be on our side then, and get back to you once I have some idea.

dccsillag commented 2 years ago

Oh, BTW, have you set any options for magma-nvim? (e.g. g:magma_image_provider = ...)

dccsillag commented 2 years ago

Update: it appears that if the plugin's code crashes, then this error would occur. So that's what we need to look for.

HagaiHargil commented 2 years ago

I didn't set any options for magma-nvim, only set a few key bindings.

dccsillag commented 2 years ago

I didn't set any options for magma-nvim, only set a few key bindings.

Excelent. That'll make debugging easier.

WhiteBlackGoose commented 1 year ago

The issue is very outdated, unlikely to persist (otherwise, feel free to open and include the relevant details)