SUSTech-data / neopyter

The bridge between Neovim and Jupyterlab
BSD 3-Clause "New" or "Revised" License
80 stars 0 forks source link

Path resolve problem in Windows #14

Open WayenVan opened 1 month ago

WayenVan commented 1 month ago

Hi, when I use the plugin in windows using proxy mode the following error occurred

Error executing luv callback:
.../nvim-data/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: ...ata/Local/nvim-data/lazy/neopyter/lua/neopyter/utils.lua:190: ENOENT: no such file or directory: C:\package.json
stack traceback:
    [C]: in function 'error'
    .../nvim-data/lazy/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next'
    .../nvim-data/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function <.../nvim-data/lazy/plenary.nvim/lua/plenary/async/async.lua:44>
nect the server

after a glance in source code, the problem is that in

lua/neopyter/jupyter/jupyterlab.lua line 8:

local __filepath__ = debug.getinfo(1).source:sub(2)

the _filepath acquired by dubug function is like

C:/xxx/xxxxx/xxxxx.lua which should be converted to C:\xxx\xxxxx\xxxxx.lua for plenary to recognised it correctly.

AbaoFromCUG commented 1 week ago

Yeah, you are right. I will find a solution for this issue later.