interpolate256: IndexError: list index out of range
Netherdrake opened this issue · comments
OS: Ubuntu 22.04
% nvim --version
NVIM v0.8.0-1210-gd367ed9b2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az505-656
Features: +acl +iconv +tui
On nvim startup I get:
Error detected while processing VimEnter Autocommands for "*"..script /home/user/.vim/plugged/vimade/autoload/vimade.vim[649]..function vimade#Init[20]..vimade#CheckWindows[7]..provider#python3#Call:
line 18:
Error invoking 'python_execute' on channel 3 (python3-script-host):
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/home/user/.vim/plugged/vimade/lib/vimade/bridge.py", line 32, in update
fader.update(nextState)
File "/home/user/.vim/plugged/vimade/lib/vimade/fader.py", line 50, in update
GLOBALS.basegroups_faded = highlighter.fade_names(GLOBALS.basegroups)
File "/home/user/.vim/plugged/vimade/lib/vimade/highlighter.py", line 59, in fade_names
return fade_ids(ids, force, clearable)
File "/home/user/.vim/plugged/vimade/lib/vimade/highlighter.py", line 76, in fade_ids
hi = __fade_id(key_id, hi[0], hi[1], hi[2], hi[3], hi[4], clearable)
File "/home/user/.vim/plugged/vimade/lib/vimade/highlighter.py", line 101, in __fade_id
ctermbg = ' ctermbg='+colors.interpolate256(ctermbg, GLOBALS.base_bg256, GLOBALS.fade_level)
File "/home/user/.vim/plugged/vimade/lib/vimade/colors.py", line 73, in interpolate256
source = RGB_256[int(source)]
IndexError: list index out of range
nvim: health#nvim#check
========================================================================
## Configuration
- OK: no issues found
## Performance
- OK: Build type: Release
## Remote Plugins
- OK: Up to date
## terminal
- INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
- INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
- INFO: $VTE_VERSION='6800'
- INFO: $COLORTERM='truecolor'
nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
- ERROR: Failed to run healthcheck for "nvim-treesitter" plugin. Exception:
function health#check, line 20
Vim(eval):E5108: Error executing lua vim/_init_packages.lua:0: module 'vim.health' not found:
no field package.preload['vim.health']
no file './vim/health.lua'
no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/vim/health.lua'
no file '/usr/local/share/lua/5.1/vim/health.lua'
no file '/usr/local/share/lua/5.1/vim/health/init.lua'
no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/health.lua'
no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/vim/health/init.lua'
no file './vim/health.so'
no file '/usr/local/lib/lua/5.1/vim/health.so'
no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim/health.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './vim.so'
no file '/usr/local/lib/lua/5.1/vim.so'
no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/vim.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
vim/_init_packages.lua: in function '__index'
...m/plugged/nvim-treesitter/lua/nvim-treesitter/health.lua:10: in main chunk
[C]: in function 'require'
[string "luaeval()"]:1: in main chunk
provider: health#provider#check
========================================================================
## Clipboard (optional)
- OK: Clipboard tool found: xclip
## Python 2 provider (optional)
- WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
- ERROR: Python provider error:
- ADVICE:
- provider/pythonx: Could not load Python 2:
python2 not found in search path or not executable.
python2.7 not found in search path or not executable.
python2.6 not found in search path or not executable.
python not found in search path or not executable.
- INFO: Executable: Not found
## Python 3 provider (optional)
- INFO: `g:python3_host_prog` is not set. Searching for python3 in the environment.
- INFO: Multiple python3 executables found. Set `g:python3_host_prog` to avoid surprises.
- INFO: Executable: /usr/bin/python3
- INFO: Other python executable: /bin/python3
- INFO: Python version: 3.10.6
- INFO: pynvim version: 0.4.3
- OK: Latest pynvim is installed.
## Python virtualenv
- OK: no $VIRTUAL_ENV
## Ruby provider (optional)
- WARNING: `ruby` and `gem` must be in $PATH.
- ADVICE:
- Install Ruby and verify that `ruby` and `gem` commands work.
## Node.js provider (optional)
- WARNING: `node` and `npm` (or `yarn`) must be in $PATH.
- ADVICE:
- Install Node.js and verify that `node` and `npm` (or `yarn`) commands work.
## Perl provider (optional)
- ERROR: perl provider error:
- ADVICE:
- "Neovim::Ext" cpan module is not installed
vim.lsp: require("vim.lsp.health").check()
========================================================================
- INFO: LSP log level : WARN
- INFO: Log path: /home/user/.cache/nvim/lsp.log
- INFO: Log size: 4 KB
vim.treesitter: require("vim.treesitter.health").check()
========================================================================
- INFO: Runtime ABI version : 14
- OK: Loaded parser for c: ABI version 13
- OK: Loaded parser for lua: ABI version 13
- OK: Loaded parser for python: ABI version 13
- OK: Loaded parser for rust: ABI version 13
Mind adding the output from VimadeInfo?
Haven't seen this before, but 1 thing that stands out is the truecolor, yet interpolate256 is being called. Is your terminal running in 24bit mode? Probably something strange was passed into this function. set termguicolors
may fix things, if not try sticking a print statement to see what the value of source
is.
Yes, I am using set termguicolors
.
I have been modernizing my Vim config (some plugins were 16 years deprecated).
I have just retried enabling [vimade](https://github.com/TaDaa/vimade)
and it just works™ on all machines.
I guess one of the old plugins was hacking something up with the colors.