Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error detected while processing function jedi#usages[2]..jedi#clear_usage #964

Open
tngreene opened this issue Nov 13, 2019 · 10 comments
Open

Comments

@tngreene
Copy link

Issue

When trying to use Ctrl-G to get usages of functions, I get an "Error detected while processing function jedi#usages[2]..jedi#clear_usages"

"~\XPlane2Blender\io_xplane2blender\xplane_helpers.py" [unix] 432L, 16958C
Error detected while processing function jedi#usages[2]..jedi#clear_usages:
line   21:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Ted\.vim\bundle\jedi-vim\pythonx\jedi_vim.py", line 558, in clear_usages
    'bufnr': buf.number,
vim.error: Vim:E119: Not enough arguments for function: prop_remove

Steps to reproduce

I can make it happen regularly, but not always with the same function.

  • Go to some identifier for a function
  • Press CTRL-G
  • Somes this error pops up and the results aren't shown.
  • I think it may not be finding the whole usages across the project when it does work either, but, that'll be a separate bug if found.

myvimrc:

set nocompatible

let script_dir = fnamemodify(expand('<sfile>'), ':h')
let &runtimepath .= ','.script_dir.','.script_dir.'/after'

" Put your config changes here.
" let g:jedi#show_call_signatures=1

let g:jedi#completions_enabled = 1

let g:jedi#popup_on_dot = 1
let g:jedi#popup_select_first = 0
let g:jedi#use_tabs_not_buffers = 0

let g:jedi#auto_vim_configuration = 0
let g:jedi#auto_initialization = 1

"Jedi Commands
let g:jedi#completions_command = "<C-n>"
let g:jedi#goto_command = "gd"
let g:jedi#documentation_command = "K"
let g:jedi#rename_command = "<leader>rn"
let g:jedi#usages_command = "<C-G>"

let g:jedi#show_call_signatures = 1
let g:jedi#show_call_signatures_delay = 500

call jedi#configure_call_signatures()
syntax on
filetype plugin indent on

Output of “:verbose JediDebugInfo”

Jedi-vim debug information

jedi-vim version
  • jedi-vim git version: 0.10.0-8-g08f13af
  • jedi git submodule status: 005f69390c4b1a3b864e7373cfcbdaf95e65411d pythonx/jedi (v0.15.1)
  • parso git submodule status: c0ace63a6905500e18d8ac06af1a0a9057e63498 pythonx/parso (v0.5.1)
Global Python

Using Python version 3 to access Jedi.

  • global sys.executable: C:\Vim\vim81\gvim.exe
  • global sys.version: 3.7.0 (default, Aug 26 2018, 16:05:01) [MSC v.1900 64 bit (AMD64)]
  • global site module: C:\Users\Ted\utils\programming\Python37\Lib\site.py
Jedi
  • path: C:\Users\Ted\.vim\bundle\jedi-vim\pythonx\jedi\jedi\__init__.py
  • version: 0.15.1
Jedi environment: <Environment: 3.7.4 in C:\Users\Ted\utils\programming\Python37>
  • executable: C:\Users\Ted\utils\programming\Python37\python.exe
  • sys_path:
    • C:\Users\Ted\utils\programming\Python37\python37.zip
    • C:\Users\Ted\utils\programming\Python37\DLLs
    • C:\Users\Ted\utils\programming\Python37\lib
    • C:\Users\Ted\utils\programming\Python37
    • C:\Users\Ted\utils\programming\Python37\lib\site-packages
Known environments
  • <Environment: 3.7.4 in C:\Users\Ted\utils\programming\Python37> (C:\Users\Ted\utils\programming\Python37\python.exe)

  • <Environment: 3.6.6 in C:\Users\Ted\utils\programming\Python36> (C:\Users\Ted\utils\programming\Python36\python.exe)

Settings
g:jedi#popup_select_first = 0 (default: 1)
g:jedi#usages_command = '<C-G>' (default: '<leader>n')
g:jedi#completions_command = '<C-n>' (default: '<C-Space>')
g:jedi#rename_command = '<leader>rn' (default: '<leader>r')
g:jedi#auto_vim_configuration = 0 (default: 1)
g:jedi#goto_command = 'gd' (default: '<leader>d')


  omnifunc=jedi#completions
	Last set from ~\.vim\bundle\jedi-vim\autoload\jedi.vim line 740
  completeopt=menu,preview

:version


VIM - Vi IMproved 8.1 (2018 May 18, compiled Dec 19 2018 20:33:53)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-608
Compiled by micbou <contact@micbou.com>
Huge version with GUI.  Features included (+) or not (-):
+acl                +cindent            +cursorshape        +farsi              +jumplist           +mksession          +path_extra         +ruby/dyn           +tcl/dyn            +vartabs            +writebackup
+arabic             +clientserver       +dialog_con_gui     +file_in_path       +keymap             +modify_fname       +perl/dyn           +scrollbind         -termguicolors      +vertsplit          -xfontset
+autocmd            +clipboard          +diff               +find_in_path       +lambda             +mouse              +persistent_undo    +signs              +terminal           +virtualedit        -xim
+autochdir          +cmdline_compl      +digraphs           +float              +langmap            +mouseshape         -postscript         +smartindent        -termresponse       +visual             +xpm_w32
+autoservername     +cmdline_hist       +directx            +folding            +libcall            +multi_byte_ime/dyn +printer            +startuptime        +textobjects        +visualextra        -xterm_save
+balloon_eval       +cmdline_info       -dnd                -footer             +linebreak          +multi_lang         +profile            +statusline         +textprop           +viminfo            
-balloon_eval_term  +comments           -ebcdic             +gettext/dyn        +lispindent         +mzscheme/dyn       +python/dyn         -sun_workshop       -tgetent            +vreplace           
+browse             +conceal            +emacs_tags         -hangul_input       +listcmds           +netbeans_intg      +python3/dyn        +syntax             +timers             -vtp                
++builtin_terms     +cryptv             +eval               +iconv/dyn          +localmap           +num64              +quickfix           +tag_binary         +title              +wildignore         
+byte_offset        +cscope             +ex_extra           +insert_expand      +lua/dyn            +ole                +reltime            +tag_old_static     +toolbar            +wildmenu           
+channel            +cursorbind         +extra_search       +job                +menu               +packages           +rightleft          -tag_any_white      +user_commands      +windows            
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL   -DFEAT_XPM_W32   -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG  /MD -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DGLOBAL_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86t.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python37.dll\" -DFEAT_MZSCHEME -I "C:\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_bkrfgg.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_bkrfgg.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl526.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=25 -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby250.dll\" -DFEAT_HUGE /Fd.\ObjGXOULYHTRZAMD64/ /Zi
Linking: link  /nologo /subsystem:windows /opt:ref /LTCG:STATUS /HIGHENTROPYVA:NO oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:AMD64 gdi32.lib version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib  /machine:AMD64  msvcrt.lib oleaut32.lib user32.lib  /nodefaultlib:lua53.lib  /STACK:8388608  /nodefaultlib:python27.lib /nodefaultlib:python37.lib   "C:\ActiveTcl\lib\tclstub86.lib" WSock32.lib xpm\x64\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug

:messages

E492: Not an editor command: MRU
"~\XPlane2Blender\io_xplane2blender\tests\test_creation_helpers.py" [unix] 736L, 27556C
search hit BOTTOM, continuing at TOP
E486: Pattern not found: exportable_collections
search hit BOTTOM, continuing at TOP
"~\XPlane2Blender\io_xplane2blender\xplane_helpers.py" [unix] 432L, 16958C
Error detected while processing function jedi#usages[2]..jedi#clear_usages:
line   21:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Ted\.vim\bundle\jedi-vim\pythonx\jedi_vim.py", line 558, in clear_usages
    'bufnr': buf.number,
vim.error: Vim:E119: Not enough arguments for function: prop_remove
:scriptnames
  1: ~\.vim\bundle\jedi-vim\minimal.vimrc
  2: ~\.vim\bundle\jedi-vim\autoload\jedi.vim
  3: C:\Vim\vim81\syntax\syntax.vim
  4: C:\Vim\vim81\syntax\synload.vim
  5: C:\Vim\vim81\syntax\syncolor.vim
  6: C:\Vim\vim81\filetype.vim
  7: C:\Vim\vim81\menu.vim
  8: C:\Vim\vim81\autoload\paste.vim
  9: C:\Vim\vim81\ftplugin.vim
 10: C:\Vim\vim81\indent.vim
 11: C:\Vim\vim81\plugin\getscriptPlugin.vim
 12: C:\Vim\vim81\plugin\gzip.vim
 13: C:\Vim\vim81\plugin\logiPat.vim
 14: C:\Vim\vim81\plugin\manpager.vim
 15: C:\Vim\vim81\plugin\matchparen.vim
 16: C:\Vim\vim81\plugin\netrwPlugin.vim
 17: C:\Vim\vim81\plugin\rrhelper.vim
 18: C:\Vim\vim81\plugin\spellfile.vim
 19: C:\Vim\vim81\plugin\tarPlugin.vim
 20: C:\Vim\vim81\plugin\tohtml.vim
 21: C:\Vim\vim81\plugin\vimballPlugin.vim
 22: C:\Vim\vim81\plugin\zipPlugin.vim
 23: ~\.vim\bundle\jedi-vim\plugin\jedi.vim
 24: C:\Vim\vim81\syntax\python.vim
 25: ~\.vim\bundle\jedi-vim\after\syntax\python.vim
 26: C:\Vim\vim81\ftplugin\python.vim
 27: ~\.vim\bundle\jedi-vim\ftplugin\python\jedi.vim
 28: ~\.vim\bundle\jedi-vim\after\ftplugin\python\jedi.vim
 29: C:\Vim\vim81\indent\python.vim
 30: C:\Vim\vim81\syntax\qf.vim
 31: C:\Vim\vim81\ftplugin\qf.vim
@tngreene

This comment has been minimized.

@blueyed
Copy link
Collaborator

blueyed commented Nov 13, 2019

Thanks for the report, will look into it later.
My first guess is that your Vim version is too old / we do not handle that properly.
Can you try a more recent version?
(yeah.. vim/vim@0a2f578)

@davidhalter
Copy link
Owner

Hmmm, but I'm still using VIM 7.4 and I don't see this problem.

@davidhalter
Copy link
Owner

But it feels like for me "multiple" usages are now broken, which is probably intentional for my VIM version. This means that when I have multiple goto results, just a random? one is picked. This issue is probably somewhere between versions where vim.Function("prop_add") is True, but the entire functionality is not there.

@tngreene
Copy link
Author

Hi, any word on this?

@blueyed
Copy link
Collaborator

blueyed commented Jan 29, 2020

@tngreene have you tried a newer Vim?
Should be fixed still, but might be a good enough workaround.

@davidhalter with Vim 7.4 another method gets used then in general.
As for #964 (comment): this is due to it going to the first one always (but "goto", not "usages" - fixed in #990).
Do you have prop_add in your Vim?

@davidhalter
Copy link
Owner

Do you have prop_add in your Vim?

E117: Unknown function: prop_add.

this is due to it going to the first one always (but "goto", not "usages" - fixed in #990).

Sorry, can you be a bit more precise? I'm not sure I understand :)

@tngreene
Copy link
Author

tngreene commented Feb 7, 2020

Okay, so, after waiting on this whole operation which I always have bad luck with - upgrading vim and getting a matching version of Python to match - I can confirm yes this appears to be fixed! Thank you for the advice and keeping the bug open for a while.

@tngreene tngreene closed this as completed Feb 7, 2020
@blueyed
Copy link
Collaborator

blueyed commented Feb 7, 2020

I'm glad it worked out, however there's still a bug there, so re-opening.

@blueyed blueyed reopened this Feb 7, 2020
@bakeryproducts
Copy link

bakeryproducts commented Dec 6, 2020

Hi, thanks for your work. (setup : with vim 8.1 (vim-gtk from Debian apt))
Im experiencing error

vim.error: Vim:E119: Not enough arguments for function: prop_remove

when im doing simple usage search (leader+n) on print function on .py script file. Which is understandable:
bug fixing PR from vim

However, by adding second arg (which is int 1) in here error is gone, but 'highlights' from usage are still there.
By adding third arg, len(buf) which should be buffer length (im a noob dont know how to get it, hardcoded for my file length) it seems to work ok.

ps after selecting suggestion from quickfix usages window it stays open, but inactive (which for me, is undesirable) so i edit this line to close it after select

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants