iron.nvim icon indicating copy to clipboard operation
iron.nvim copied to clipboard

Can't open REPL due to nil value

Open vitalwarley opened this issue 5 years ago • 18 comments

When :IronRepl in a python file, I get

E5105: Error while calling lua chunk: ...lativ/.vim/pack/minpac/start/iron.nvim/lua/iron/view.lua:23: attempt to index field 'fn' (a n il value)

with :IronRepl.

And

E5105: Error while calling lua chunk: ...lativ/.vim/pack/minpac/start/iron.nvim/lua/iron/init.lua:120: attempt to index a nil value

with :IronReplHere.

I am using the latest version: 4876bd3. Tell me how I can provide more information, if needed.

Thanks!

vitalwarley avatar Jul 27 '20 11:07 vitalwarley

Hum.. which version of neovim are you using? I guess latest refactoring pulled some very recent lua features that might not be available on your distribution yet. I guess it might be the case to hold it back for a while then.

hkupty avatar Jul 29 '20 21:07 hkupty

Sorry for the delay.

I am using the current stable release (neovim 0.4.3-3 in Arch Linux):

NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5

vitalwarley avatar Aug 02 '20 23:08 vitalwarley

I have this issue as well and I think it is something to do with https://github.com/hkupty/iron.nvim/pull/160/files#diff-84aa2c479219a776d99bf50f3c91fe15R54 (or related changes) If you point the plugin to a version before that PR, it works

philomates avatar Aug 19 '20 09:08 philomates

I also had to revert https://github.com/hkupty/iron.nvim/pull/159 given that https://github.com/hkupty/iron.nvim/pull/159/files#diff-84aa2c479219a776d99bf50f3c91fe15R193 was somehow also having nil issues

philomates avatar Aug 19 '20 09:08 philomates

I was thinking on doing a hack by emulating vim.fn and vim.o, but I guess it won't work right due to other things vim.fn does, like type coercing.

I'm going to install the latest release of nvim (as opposed to master, which is what I use) and work from there. I'll keep you guys posted.

hkupty avatar Aug 19 '20 18:08 hkupty

same thing here, also arch, nvim 0.4.4, reverted to commit 33d80dbf0c964c921d1b8ed711d795d3844163a3 and it works.

danjenson avatar Sep 27 '20 06:09 danjenson

same issue, can not use iron.nvim any more:(

qian-lab avatar Oct 22 '20 04:10 qian-lab

sorry for taking so long for fixing this. I is being really difficult to keep up. Please use this branch if you're having problems: Plug 'hkupty/iron.nvim', { 'branch': 'direct-invoke' }.

If I get positive feedback that it's working, I might merge it to master. Hopefully the new API will be released soon enough so I'll be able to revert this.

Once again, sorry for the mess :(

hkupty avatar Oct 22 '20 11:10 hkupty

sorry for taking so long for fixing this. I is being really difficult to keep up. Please use this branch if you're having problems: Plug 'hkupty/iron.nvim', { 'branch': 'direct-invoke' }.

If I get positive feedback that it's working, I might merge it to master. Hopefully the new API will be released soon enough so I'll be able to revert this.

Once again, sorry for the mess :(

Thanks for the effort! I tried quickly (first PluginClean and then PluginInstall ), but still the same error. my neovim version 0.5.0

qian-lab avatar Oct 22 '20 13:10 qian-lab

@hkupty thanks for taking the time to work on that! I have removed the plugin and installed it again, but using the branch you mentioned. I didn't test much, but until now it's is working properly. Again, thank you!

@qian-lab are you sure you used the direct-invoke branch?

vitalwarley avatar Oct 22 '20 16:10 vitalwarley

:IronRepl works fine, but :IronReplHere gives

E5105: Error while calling lua chunk: ...lativ/.vim/pack/minpac/start/iron.nvim/lua/iron/init.lua:123: Invalid window id

vitalwarley avatar Oct 22 '20 17:10 vitalwarley

@vitalwarley I've just pushed an update which might solve the issue. It seems that one is not related to this issue. Let me know if it works for you now!

Best regards and thanks for the support, Henry

hkupty avatar Oct 22 '20 19:10 hkupty

I installed on branch 'master' , :IronRepl gives E5105: Error while calling lua chunk: ...os/github.com/Vigemus/iron.nvim_master/lua/iron/view.lua:23: attempt to index f ield 'fn' (a nil value) and <Plug>(iron-send-line) gives E5105: Error while calling lua chunk: ...os/github.com/Vigemus/iron.nvim_master/lua/iron/init.lua:359: attempt to index field 'fn' (a nil value)

vpeopleonatank avatar Nov 04 '20 13:11 vpeopleonatank

Thank you. Using the direct-invoke branch solved the problem for me.

lirorc avatar Nov 18 '20 11:11 lirorc

The direct-invoke branch worked for me too.

ericjam avatar Dec 03 '20 20:12 ericjam

With the following:

:IronRepl

I'm getting the following error:

E5105: Error while calling lua chunk: .../.vim/bundle/iron.nvim/lua/iron/init.lua:115: attempt to call field 'nvim_create_buf' (a nil value)

I tried the following:

  • Install using direct-invoke branch: didn't work
  • Install using an older commit 7e5479e: didn't work

Neovim info:

NVIM v0.3.8
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

OS: Centos 8

dkioroglou avatar Jan 29 '21 14:01 dkioroglou

Hi @DKioroglou. I think the issue you're having is different than the one described in this thread. The version of neovim you're using is below 0.4, which I belive is where some of the lower level lua API functions were introduced, such as nvim_create_buf.

I'd suggest, if possible, to update your neovim version. If that's not the case, then we can check how to proceed.

Best, Henry

hkupty avatar Jan 29 '21 21:01 hkupty

In order to update neovim in Centos 8, I had to install from source. Current neovim version:

NVIM v0.5.0-dev+1062-gcc1851c9f
Build type: Release
LuaJIT 2.1.0-beta3

After iron.nvim installation (without using the direct-invoke branch), :IronRepl worked just fine.

Thanks.

dkioroglou avatar Feb 01 '21 07:02 dkioroglou