Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open REPL due to nil value #162

Open
vitalwarley opened this issue Jul 27, 2020 · 18 comments
Open

Can't open REPL due to nil value #162

vitalwarley opened this issue Jul 27, 2020 · 18 comments

Comments

@vitalwarley
Copy link

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!

@hkupty
Copy link
Collaborator

hkupty commented Jul 29, 2020

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.

@vitalwarley
Copy link
Author

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

@philomates
Copy link

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
Copy link

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

@hkupty
Copy link
Collaborator

hkupty commented Aug 19, 2020

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.

@danjenson
Copy link

danjenson commented Sep 27, 2020

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

@qian-lab
Copy link

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

@hkupty
Copy link
Collaborator

hkupty commented Oct 22, 2020

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 :(

@qian-lab
Copy link

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

@vitalwarley
Copy link
Author

@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
Copy link
Author

vitalwarley commented Oct 22, 2020

: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

@hkupty
Copy link
Collaborator

hkupty commented Oct 22, 2020

@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

@vpeopleonatank
Copy link

vpeopleonatank commented Nov 4, 2020

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)

@lirorc
Copy link
Contributor

lirorc commented Nov 18, 2020

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

@ericjam
Copy link

ericjam commented Dec 3, 2020

The direct-invoke branch worked for me too.

@dkioroglou
Copy link

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

@hkupty
Copy link
Collaborator

hkupty commented Jan 29, 2021

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

@dkioroglou
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants