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

Error text appears every time I do anything #30

Open
mclarkson opened this issue Apr 13, 2024 · 1 comment
Open

Error text appears every time I do anything #30

mclarkson opened this issue Apr 13, 2024 · 1 comment

Comments

@mclarkson
Copy link

I had error text about a job being undefined every time I tried to do anything, then the window would appear and things would work once I accepted the error message. I updated to latest neovim and lunarvim (since I'm using lunarvim) but it didn't seem to help.

Actual error:

E5108: Error executing lua ...arvim/site/pack/lazy/opt/ollama.nvim/lua/ollama/init.lua:294: attempt to index local 'job' (a nil value)

To fix this I had to add, at line 294:

if job == nil then
	return
end

so it looks like:

	})
	---@param j Job
	if job == nil then
		return
	end
	job:add_on_exit_callback(function(j)
		if stream_called then
			return
		end

Then the errors stopped.

This plugin is fantastic by the way, thank you!!

@nomnivore
Copy link
Owner

Are you still having this issue? Neovim or neovim nightly?

Job really shouldn't be nil here, because it's being defined by the plenary curl method just above. I'm curious how it is both not recognizing the job object yet still seems to be working?

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

2 participants