pappasam / jedi-language-server

A Python language server exclusively for Jedi. If Jedi supports it well, this language server should too.
MIT License
596 stars 45 forks source link

ValueError: `column` parameter (1) is not in a valid range (0-0) for line 14 ('\n') #298

Closed alexveden closed 10 months ago

alexveden commented 10 months ago

I'm experiencing weird behavior of the jedi lsp server after OS upgrade. This message shows up in Neovim when I move cursor at empty line of a python file.

The behaviour is weird because I have another almost identical machine, with the same version of the jedi lsp installed via Mason. So that other machine worked fine, until I upgraded AstronVim to version 3.39 (was 3.37). However, downgading back doesn't help, so I stuck with this issue on both machines.

I've tried different Python versions (3.9, 3.10, 3.11), also nvim versions 0.9.2 / 0.9.4, also different jedi-lsp servers 0.39, 0.40, 0.41.2. In all of these the issue remains the same.

Are there any moving parts I'm missing? As I noticed, during the upgrade the AstronVim also compiles TreeSitter, can this be a reason?


Technical stuff

lsp_signatur handler RPC[Error] code_name = InternalError, message = "ValueError: `column` parameter (1) is not in a valid range (0-0) for line 14 ('\n')." data = {
  traceback = { '  File "/home/user/.local/share/nvim/mason/packages/jedi-language-server/venv/lib/python3.11/site-packages/pygls/protocol/json_rpc.py", line 266, in _h
andle_request
    self._execute_request(msg_id, handler, params)
', '  File "/home/user/.local/share/nvim/mason/packages/jedi-language-server/venv/lib/python3.11/site
-packages/pygls/protocol/json_rpc.py", line 188, in _execute_request
    self._send_response(msg_id, handler(params))
                                ^^^^^^^^^^^^^^^
', '
 File "/home/user/.local/share/nvim/mason/packages/jedi-language-server/venv/lib/python3.11/site-packages/jedi_language_server/server.py", line 277, in signature_help

    signatures_jedi = jedi_script.get_signatures(*jedi_lines)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
', "  File "/home/user/.local/share/nvim/
mason/packages/jedi-language-server/venv/lib/python3.11/site-packages/jedi/api/helpers.py", line 484, in wrapper
    raise ValueError('`column` parameter (%d) is not in a v
alid range '

" }

My environment (my alt machine where everything worked):

Mason env pip freeze (same for both machines)

(venv) ~/.local/share/nvim/mason/packages/jedi-language-server/venv ➜ bin/pip freeze
attrs==23.1.0
cattrs==23.1.2
docstring-to-markdown==0.13
exceptiongroup==1.2.0
jedi==0.19.1
jedi-language-server==0.41.2
lsprotocol==2023.0.0
parso==0.8.3
pygls==1.2.1
typing_extensions==4.8.0
alexveden commented 10 months ago

It looks like the issue was caused by side plugin. And disappeared after disabling it.

Just for the record, leaving the corresponding issue here: https://github.com/ray-x/lsp_signature.nvim/issues/298