Shougo / deoplete.nvim

:stars: Dark powered asynchronous completion framework for neovim/Vim8
Other
5.94k stars 295 forks source link

ValueError: `column` parameter (8) is not in a valid range (0-0) for line 421 ('\n'). #1200

Closed griiid closed 2 years ago

griiid commented 2 years ago

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

The error message shows when I typing a variable:

[deoplete] Traceback (most recent call last):
  File "/Users/eddiehsu/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 203, in _gather_results
    result = self._get_result(context, source)
  File "/Users/eddiehsu/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/child.py", line 267, in _get_result
    ctx['candidates'] = source.gather_candidates(ctx)
  File "/Users/eddiehsu/.vim/plugged/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/profiler.py", line 37, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/eddiehsu/.vim/plugged/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi.py", line 202, in gather_candidates
    completions = self.get_completions(script, line, col)
  File "/Users/eddiehsu/.vim/plugged/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi/profiler.py", line 37, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/eddiehsu/.vim/plugged/deoplete-jedi/rplugin/python3/deoplete/sources/deoplete_jedi.py", line 148, in get_completions
    return script.complete(line, col)
  File "/Users/eddiehsu/.pyenv/versions/3.8.13/lib/python3.8/site-packages/jedi/api/helpers.py", line 484, in wrapper
    raise ValueError('`column` parameter (%d) is not in a valid range '
ValueError: `column` parameter (8) is not in a valid range (0-0) for line 421 ('\n').
Error from jedi: `column` parameter (8) is not in a valid range (0-0) for line 421 ('\n').  Use :messages / see above for error details.

Expected

No error.

Environment Information

deoplete: health#deoplete#check

deoplete.nvim

jedi: health#jedi#check

jedi

nvim: health#nvim#check

Configuration

Performance

Remote Plugins

terminal

provider: health#provider#check

Clipboard (optional)

Python 3 provider (optional)

Python virtualenv

Ruby provider (optional)

Node.js provider (optional)

Perl provider (optional)

targets: health#targets#check

vim.lsp: require("vim.lsp.health").check()

vim.treesitter: require("vim.treesitter.health").check()

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
call plug#begin('~/.vim/plugged')
Plug 'davidhalter/jedi-vim'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'deoplete-plugins/deoplete-jedi'
call plug#end()
let g:jedi#use_tabs_not_buffers=1
let g:jedi#goto_stubs_command=""
let g:jedi#completions_enabled = 0
let g:deoplete#enable_at_startup = 1
let py_global_version = readfile('/Users/' . $USER . '/.pyenv/version')[0]
let g:python3_host_prog = '/Users/' . $USER . '/.pyenv/versions/' . py_global_version . '/bin/python3'

How to reproduce the problem from neovim/Vim startup (Required!)

  1. Open a file in my project.
  2. Type d 截圖 2022-11-15 11 38 46
  3. Type f 截圖 2022-11-15 11 38 52

Screenshot (if possible)

The screenshot pictures are in the reproduce-section

Upload the log file

The error is at around line 4368.

log_py3_rplugin.log

Shougo commented 2 years ago

It seems jedi's error instead of deoplete.

Shougo commented 2 years ago

Please update deoplete-jedi to the latest.