wookayin / semshi

🌈 Semantic Highlighting for Python in Neovim
79 stars 5 forks source link

`cmd: ''` is not executable error on startup #25

Closed JasonGrace2282 closed 4 months ago

JasonGrace2282 commented 4 months ago

Traceback

BufReadPost Autocommands for "*"..FileType Autocommands for "python"..FileType Autocommands for "*"..function <SNR>61_filetype_changed[10]..remote#define#CommandBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[12]..provider#Poll, line 6
Vim(let):E475: Invalid value for argument cmd: '' is not executable
Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:24: Error executing lua: /usr/share/nvim/runtime/filetype.lua:25: BufReadPost Autocommands for "*"..FileType Autocommands for "python"..FileType Autocommands for "*"..function <SNR>61_filetype_changed[10]..remote#define#CommandBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[12]..provider#Poll, line 17: Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
stack traceback:
    [C]: in function 'nvim_cmd'
    /usr/share/nvim/runtime/filetype.lua:25: in function </usr/share/nvim/runtime/filetype.lua:24>
    [C]: in function 'nvim_buf_call'
    /usr/share/nvim/runtime/filetype.lua:24: in function </usr/share/nvim/runtime/filetype.lua:10>
stack traceback:
    [C]: in function 'nvim_buf_call'
    /usr/share/nvim/runtime/filetype.lua:24: in function </usr/share/nvim/runtime/filetype.lua:10>

Reproduce:

Replace your init.lua with this:

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
    {
         "wookayin/semshi", -- use a maintained fork
          ft = "python",
          build = ":UpdateRemotePlugins",
    }
})

Then run the following commands (for unix-like systems)

python3 -m venv .venv
source .venv/bin/activate
touch test.py
nvim test.py
wookayin commented 4 months ago

This is a issue on the pynvim provider side, not this plugin. Can you make sure has("python3") and :py3 work correctly? You'll need to install pynvim properly. Also read the NVIM_PYTHON_LOG_FILE log file.