ycm-core / YouCompleteMe

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

Error detected while processing function youcompleteme#Enable #967

Closed cfy-github closed 10 years ago

cfy-github commented 10 years ago

I'm using OS X 10.8.5 and took the latest YCM. Followed all the steps in [Mac OS X super-quick installation] EXCEPT that I didn't install YouCompleteMe with Vundle. This is because when I tried this, the vundle froze at "Processing YouCompleteMe" for more than 3 hours and I thought it won't work. Thus I manually run "git submodule update --init --recursive" in folder ~/.vim/bundle/YouCompleteMe/ and compile YCM with install.sh. It works fine when I open a cpp file using vim. However, after rebooting the my mac, the following messages pop out each time I open VIM: -------------Error Messages-------------------------- Messages maintainer: Bram Moolenaar Bram@vim.org Error detected while processing function youcompleteme#Enable: line 26: Traceback (most recent call last): Error detected while processing function youcompleteme#Enable: line 26: File "", line 1, in Error detected while processing function youcompleteme#Enable: line 26: File "/Users/fychen/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 30, in Error detected while processing function youcompleteme#Enable: line 26: from ycm.completers.all.omni_completer import OmniCompleter Error detected while processing function youcompleteme#Enable: line 26: File "/Users/fychen/.vim/bundle/YouCompleteMe/autoload/../python/ycm/completers/all/omni_completer.py", line 24, in Error detected while processing function youcompleteme#Enable: line 26: from ycm.client.base_request import BuildRequestData Error detected while processing function youcompleteme#Enable: line 26: File "/Users/fychen/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 21, in Error detected while processing function youcompleteme#Enable: line 26: import requests Error detected while processing function youcompleteme#Enable: line 26: ImportError: No module named requests Error detected while processing function youcompleteme#Enable: line 27: Traceback (most recent call last): Error detected while processing function youcompleteme#Enable: line 27: File "", line 1, in Error detected while processing function youcompleteme#Enable: line 27:

NameError: name 'YouCompleteMe' is not defined

vim --version :

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 14 2014 11:01:04) 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. -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -F/System/Library/Frameworks -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lncurses -liconv -framework Cocoa -fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -framework Python -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -framework Ruby

I'm new to YCM. Can anyone help me pls?

vheon commented 10 years ago

So you are sure that the third_party library have been checked out? What is the output of

:py import sys
:py print sys.path
cfy-github commented 10 years ago

":py import sys" gives: 1 ":py print sys.path" gives: ['/Users/fychen/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/waitress', '/Users/fychen/.vim /bundle/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer', '/Users/fychen/.vim/bundle/YouCo mpleteMe/third_party/ycmd/third_party/jedi', '/Users/fychen/.vim/bundle/YouCompleteMe/third_party/ycm d/third_party/frozendict', '/Users/fychen/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bott le', '/Users/fychen/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/argparse', '/Users/fychen/ .vim/bundle/YouCompleteMe/third_party/ycmd', '/Users/fychen/.vim/bundle/YouCompleteMe/third_party/ret ries', '/Users/fychen/.vim/bundle/YouCompleteMe/third_party/requests-futures', '/Users/fychen/.vim/bu ndle/YouCompleteMe/third_party/requests', '/Users/fychen/.vim/bundle/YouCompleteMe/third_party/python futures', '/Users/fychen/.vim/bundle/YouCompleteMe/autoload/../third_party/ycmd', '/Users/fychen/.vim /bundle/YouCompleteMe/autoload/../python', '/System/Library/Frameworks/Python.framework/Versions/2.7/ lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Framew orks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framew ork/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.frame work/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/p ython2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', ' /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library /Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packag es', '_vimpath']

Valloric commented 10 years ago

Please see CONTRIBUTING.md.