ycm-core / YouCompleteMe

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

Plugin doesn't work in Python files after update #1294

Closed vishalsurana closed 9 years ago

vishalsurana commented 9 years ago

Hello, I've been using a 8-9 month old version of youcompleteme plugin with no issues. I update the source code last night and rebuilt the code and ever since the plugin has not been working for python files (but works for others). I have seen a similar issue online, but that seemed to an issue with Ctrl-P plugin. Below is a full description as per guidelines:

1) call PluginUpdate from vundle 2) ./install.sh --clang-completer

(I did not use macvim earlier and it worked, so I did not install it this time). After this setup, the plugin works for all non-python files. Output of YcmDebugInfo:

Error detected while processing function 93_DebugInfo: line 2: Traceback (most recent call last): File "", line 1, in NameError: name 'ycm_state' is not defined E858: Eval did not return a valid python object

Added the following lines to my .vimrc (observed no new changes):

let g:ycm_server_use_vim_stdout = 1 let g:ycm_server_log_level = 'debug'

I removed the full plugin directory and did a reinstall, but hit the same error. Then I decided to install macvim as per instructions in the readme (followed it up with a clean install of plugin). The output of YcmDebugInfo is still the same as above. I have also done a clean build of vim from source with python support, but things remain the same. The only python specific plugins that I have are python-mode and syntastic, but removing them doesn't help.

OS: Mac OS X - Yosemite vim --version

15:32:02 ~ $ /usr/local/bin/mvim --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 21 2014 15:31:26) MacOS X (unix) version Included patches: 1-258 Compiled by Homebrew Huge version with MacVim GUI. Features included (+) or not (-): +acl +file_in_path +mouse_sgr +tag_binary +arabic +find_in_path -mouse_sysmouse +tag_old_static +autocmd +float +mouse_urxvt -tag_any_white +balloon_eval +folding +mouse_xterm +tcl +browse -footer +multi_byte +terminfo ++builtin_terms +fork() +multi_lang +termresponse +byte_offset +fullscreen -mzscheme +textobjects +cindent -gettext +netbeans_intg +title +clientserver -hangul_input +odbeditor +toolbar +clipboard +iconv +path_extra +transparency +cmdline_compl +insert_expand +perl +user_commands +cmdline_hist +jumplist +persistent_undo +vertsplit +cmdline_info +keymap +postscript +virtualedit +comments +langmap +printer +visual +conceal +libcall +profile +visualextra +cryptv +linebreak +python +viminfo +cscope +lispindent -python3 +vreplace +cursorbind +listcmds +quickfix +wildignore +cursorshape +localmap +reltime +wildmenu +dialog_con_gui -lua +rightleft +windows +diff +menu +ruby +writebackup +digraphs +mksession +scrollbind -X11 +dnd +modify_fname +signs -xfontset -ebcdic +mouse +smartindent +xim +emacs_tags +mouseshape -sniff -xsmp +eval +mouse_dec +startuptime -xterm_clipboard +ex_extra -mouse_gpm +statusline -xterm_save +extra_search -mouse_jsbterm -sun_workshop -xpm +farsi +mouse_netterm +syntax system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" 2nd user gvimrc file: "~/.vim/gvimrc" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim" Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/System/Library/Frameworks/Tcl.framework/Headers -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_DARWIN_C_SOURCE=1 Linking: clang -L. -L/usr/local/lib -L. -L/usr/local/lib -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -framework Cocoa -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -framework Python -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -framework Ruby

vheon commented 9 years ago

Do you have python installed by brew?

vishalsurana commented 9 years ago

Yes, that is true. I went through the instructions, removed it and installed python 2.7.8 (from brew), then removed and reinstalled macvim, removed and reinstalled youcompleteme, and still have this problem. In fact, now I'm unable to open any file format other than python files! This is the error message (both vim and macvim):

Vim: Caught deadly signal ABRT Vim: Finished. Abort trap: 6

Any suggestions?

FYI, while installing youcompleteme, I see this apparent version mismatch:

Your C++ compiler supports C++11, compiling in that mode. -- Found PythonLibs: /usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/Python (found suitable version "2.7.8", minimum required is "2.6") -- Found PythonInterp: /usr/bin/python2.6 (found suitable version "2.6.9", minimum required is "2.6")

Is that ok?

EDIT: "brew unlink python" seems to have fixed the crash issue. The other issue is still there and might well be due to the above version mismatch

EDIT2: Something strange going on and couldn't find any information online. I did another reinstall and this time, the plugin works for certain python files, but not with others (in the same git repo). YcmDebugInfo in the file that works:

Printing YouCompleteMe debug information... -- Server has Clang support compiled in: True

-- Clang version: clang version 3.5.0 (tags/RELEASE_350/final)

-- Server running at: http://127.0.0.1:59722 -- Server process ID: 33223

vheon commented 9 years ago

look #8