Cannot connect to neopyter extension
hi @me,
Im trying to create both test.ju.py in nvim an test.ipynb on jupyter lab. The neopyter is configured as instruction. However, when checkhealth for neopyter, it shows as below. Perhap I did something wrong, can you pls advise?
==============================================================================
neopyter: require("neopyter.health").check()
neopyter: config ~
- {
auto_attach = true,
auto_connect = true,
file_pattern = { "*.ju.*" },
filename_mapper = <function 1>,
highlight = {
enable = true,
shortsighted = false
},
jupyter = {
auto_activate_file = true,
scroll = {
align = "auto",
enable = true
}
},
mode = "direct",
on_attach = <function 2>,
parser = {
line_magic = true,
trim_whitespace = true
},
remote_address = "127.0.0.1:9001",
textobject = {
enable = true
},
use_default_keybindings = false
}
neopyter: version ~
- neovim plugin([email protected]) status: inactive
Looks weird, Whenever you open a xxx.ju.py (e.g. :e main.ju.py), the neovim plugin(neopyter) should be activated, it should look like:
neopyter: version ~
- neovim plugin([email protected]) status: active
- jupyter lab extension: don't connect
neopyter: status ~
- attach=ready, connect=syncing
- file attach connect remote_path
- * main.ju.py true false
and here is my all :checkhealth neopyter result
==============================================================================
neopyter: require("neopyter.health").check()
neopyter: config ~
- {
auto_attach = true,
auto_connect = true,
file_pattern = { "*.ju.*" },
filename_mapper = <function 1>,
highlight = {
enable = true,
shortsighted = false
},
jupyter = {
auto_activate_file = true,
scroll = {
align = "auto",
enable = true
}
},
mode = "direct",
on_attach = <function 2>,
parser = {
line_magic = true,
trim_whitespace = true
},
remote_address = "127.0.0.1:9001",
textobject = {
enable = true
},
use_default_keybindings = true
}
neopyter: version ~
- neovim plugin([email protected]) status: active
- jupyter lab extension: don't connect
neopyter: status ~
- attach=ready, connect=syncing
- file attach connect remote_path
- * main.ju.py true false
In the current state, neovim should listen to the network port 9001
lsof -i:9001
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nvim 21975 abao 31u IPv4 66442 0t0 TCP localhost:etlservicemgr (LISTEN)
Some tips may help you
- Don't open two neovim program instance with same address be listened
- Neopyter(neovim plugin) is activated by an autocmd of
BufReadPostwithfile_patternautomatically
Thanks @AbaoFromCUG, I think there was an issue with the socket connection. I got it fixed by following this discussion: https://github.com/zauberzeug/nicegui/issues/1178#issuecomment-1677678994
I now can see it listened to port 9001 but status is still inactive. I will try to debug more.