Skip to content

Error detected while processing function PollSignatureHelp with python-lsp-server and numpy #4313

@amosnier

Description

@amosnier

@puremourning was able to reproduce, here comes his text:

python3 -m venv .env
source .env/bin/activate
pip install numpy python-lsp-server
cp ~/.vim/bundle/YouCompleteMe/vimrc_ycm_minimal .
vi vimrc_ycm_minimal

" windows default encoding is not supported
set encoding=utf-8

" If you using neovim and python isn't loading, copy your python setup from your
" vimrc here:
"
" let g:python3_host_prog = '/path/to/python3/with/neovim/module'
"
" But remember that neovim is not officially supported, so please reproduce in
" Vim.

" Enable debugging
let g:ycm_keep_logfiles = 1
let g:ycm_log_level = 'debug'

" If the base settings don't repro, paste your existing config for YCM only,
" here:
" let g:ycm_....

let g:ycm_language_server = [
        \   {
        \     'name': 'pylsp',
        \     'cmdline': [ 'pylsp' ],
        \     'filetypes': [ 'python' ],
        \   },
        \ ]

" Load YCM (only)
let &rtp .= ',/Users/ben/.vim/bundle/YouCompleteMe'
filetype plugin indent on
syn on


vim -Nu vimrc_ycm_minimal test.py

write:

import numpy as np
np.isnan(

When doing that, I am myself getting:

Messages maintainer: The Vim Project
"test.py" 3L, 28B
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
Traceback (most recent call last):
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
  File "<string>", line 1, in <module>
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
  File ".vim/plugged/YouCompleteMe/python/ycm/youcompleteme.py", line 425, in UpdateSignatureHelp
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
    self._signature_help_state = signature_help.UpdateSignatureHelp(
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
  File ".vim/plugged/YouCompleteMe/python/ycm/signature_help.py", line 190, in UpdateSignatureHelp
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
    state.popup_win_id = GetIntValue(
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
                         ^^^^^^^^^^^^
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
  File ".vim/plugged/YouCompleteMe/python/ycm/vimsupport.py", line 927, in GetIntValue
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
    return int( vim.eval( variable ) or 0 )
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
                ^^^^^^^^^^^^^^^^^^^^
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
vim.error: Vim:E475: Invalid value for argument length
Error detected while processing function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp[5]..function <SNR>87_PollSignatureHelp[19]..<SNR>87_UpdateSignatureHelp:
line    5:
E858: Eval did not return a valid python object

1 change; before #5  15 seconds ago
"messages.txt" [New] 0L, 0B written
45 more lines
"messages.txt" 46L, 3383B written
"messages.txt" 44L, 3381B written
1 more line; before #3  17 seconds ago
1 more line; before #2  19 seconds ago
46 fewer lines; before #1  29 seconds ago
"messages.txt" 0L, 0B written

Printing YouCompleteMe debug information...
-- Resolve completions: Up front
-- Client logfile: /tmp/ycm_jc35oi8_.log
-- Server Python interpreter: /usr/bin/python3
-- Server Python version: 3.12.3
-- Server has Clang support compiled in: True
-- Clang version: clang version 19.1.0 (https://github.com/ycm-core/llvm 6355059428ba8b509409c352f953b0602d29595c)
-- No extra configuration file found
-- GenericLSP completer debug information:
--   pylspCompleter running
--   pylspCompleter process ID: 18403
--   pylspCompleter executable: ['/tmp/test/venv/bin/pylsp']
--   pylspCompleter logfiles:
--     /tmp/pylspcompleter_stderrlt7onuub.log
--   pylspCompleter Server State: Initialized
--   pylspCompleter Project Directory: /tmp/test
--   pylspCompleter Open Workspaces: {'/tmp/test'}
--   pylspCompleter Settings: {}
-- Server running at: http://127.0.0.1:51803
-- Server process ID: 18384
-- Server logfiles:
--   /tmp/ycmd_51803_stdout_d1lyimlr.log
--   /tmp/ycmd_51803_stderr_dtqjxv0h.log
-- Semantic highlighting supported: True
-- Virtual text supported: True
-- Popup windows supported: True
``

Metadata

Metadata

Assignees

No one assigned

    Labels

    UpstreamIssue is likely in upstream completion engine. Awaiting upstream patches.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions