ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.46k stars 2.81k forks source link

YCM jedi failing to provide code-completion for the kivy library #3067

Closed Talal-l closed 6 years ago

Talal-l commented 6 years ago

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your issue:

Thank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.

Issue Details

JediHttp returns error code 500 when trying to complete from the Kivy library.

The problem appears to be cause by jediHttp passing extra parameters to __init__.py in the kivy library.

A workaround to this problem is to modify the __init__.py in the kivy library so it ignores the incorrect parameters instead of exiting.

Installed kivy using the following steps

sudo apt-get install -y \
    python3-pip \
    build-essential \
    git \
    python3 \
    python3-dev \
    ffmpeg \
    libsdl2-dev \
    libsdl2-image-dev \
    libsdl2-mixer-dev \
    libsdl2-ttf-dev \
    libportmidi-dev \
    libswscale-dev \
    libavformat-dev \
    libavcodec-dev \
    zlib1g-dev

pip3 install cython==0.28.3
pip3 install https://github.com/kivy/kivy/archive/master.zip

started vim with python file containing

from kivy import

Activated the completer after the import using Ctrl+Space.

List of modules in the kivy library, like how it appears when jedi is used in atom using autocomplete-python-jedi plugin.

screen shot

No list is provided and no code-completion for the library.

Diagnostic data

Output of vim --version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)
Included patches: 1-1453
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by pkg-vim-maintainers@lists.alioth.debian.org
Huge version without GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    -tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               -perl              +vertsplit
-clipboard         +jumplist          +persistent_undo   +virtualedit
+cmdline_compl     +keymap            +postscript        +visual
+cmdline_hist      +lambda            +printer           +visualextra
+cmdline_info      +langmap           +profile           +viminfo
+comments          +libcall           -python            +vreplace
+conceal           +linebreak         +python3           +wildignore
+cryptv            +lispindent        +quickfix          +wildmenu
+cscope            +listcmds          +reltime           +windows
+cursorbind        +localmap          +rightleft         +writebackup
+cursorshape       -lua               -ruby              -X11
+dialog_con        +menu              +scrollbind        -xfontset
+diff              +mksession         +signs             -xim
+digraphs          +modify_fname      +smartindent       -xpm
-dnd               +mouse             +startuptime       -xsmp
-ebcdic            -mouseshape        +statusline        -xterm_clipboard
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_save
+eval              +mouse_gpm         +syntax            
+ex_extra          -mouse_jsbterm     +tag_binary        
+extra_search      +mouse_netterm     +tag_old_static    
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-NQEcoP/vim-8.0.1453=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl     -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm  

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Client logfile: /tmp/ycm_p073qlg5.log
-- Server Python interpreter: /usr/bin/python3
-- Server Python version: 3.6.5
-- Server has Clang support compiled in: True
-- Clang version: clang version 6.0.0 (tags/RELEASE_600/final)
-- Extra configuration file found and loaded
-- Extra configuration path: /home/u18t/dotfiles/extra_config/ycm_extra_conf.py
-- Python completer debug information:
--   JediHTTP running at: http://127.0.0.1:46889
--   JediHTTP process ID: 20880
--   JediHTTP executable: /home/u18t/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp
--   JediHTTP logfiles:
--     /tmp/jedihttp_46889_stdout_7fu_inor.log
--     /tmp/jedihttp_46889_stderr_8mvmb9pk.log
--   Python interpreter: /usr/bin/python3
-- Server running at: http://127.0.0.1:45399
-- Server process ID: 20838
-- Server logfiles:
--   /tmp/ycmd_45399_stdout_5110tx5k.log
--   /tmp/ycmd_45399_stderr__s81zebv.log

Contents of YCM, ycmd and completion engine logfiles

Logs

OS version, distribution, etc.

Ubuntu 18.04 LTS

bstaletic commented 6 years ago

YCM hasn't updated the ycmd submodule yet. The ycmd submodule doesn't use JediHTTP any more, rather, it uses jedi directly. Can you do the following:

Talal-l commented 6 years ago

Updating the submodule solved the problem. Thank you.

bstaletic commented 6 years ago

Let's keep this open until we officially update the submodule.