ycm-core / YouCompleteMe

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

YCM could not be started due to import error in python code #2187

Closed thekvs closed 8 years ago

thekvs commented 8 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

I've installed latest YCM (8b1fba22cc50c2fd004881ebc6fc64246fe84592) with python3 but plugin could not be started and produces following backtrace from python interpreter:

File "/home/kvs/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 26, in <module>
    import requests
  File "/home/kvs/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests/requests/__init__.py", line 58, in <m
odule>
    from . import utils
  File "/home/kvs/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests/requests/utils.py", line 12, in <modu
le>
    import cgi
  File "/usr/lib/python3.5/cgi.py", line 42, in <module>
    import html
  File "/home/kvs/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/python-future/src/html/__init__.py", line 7, i
n <module>
    raise ImportError('This package should not be accessible on Python 3. '
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src
 folder or your installation of python-future is corrupted.
YouCompleteMe unavailable: This package should not be accessible on Python 3. Either you are trying to run from the pyt
hon-future src folder or your installation of python-future is corrupted.

VIM's version:

kvs@bb-v1 ~:> LANGUAGE="C" vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 08 2016 11:38:28)
Included patches: 1-1689
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_netterm   +tag_binary
+arabic          +file_in_path    +mouse_sgr       +tag_old_static
+autocmd         +find_in_path    -mouse_sysmouse  -tag_any_white
-balloon_eval    +float           +mouse_urxvt     +tcl
-browse          +folding         +mouse_xterm     +terminfo
++builtin_terms  -footer          +multi_byte      +termresponse
+byte_offset     +fork()          +multi_lang      +textobjects
+channel         +gettext         -mzscheme        +timers
+cindent         -hangul_input    +netbeans_intg   +title
-clientserver    +iconv           +packages        -toolbar
-clipboard       +insert_expand   +path_extra      +user_commands
+cmdline_compl   +job             +perl            +vertsplit
+cmdline_hist    +jumplist        +persistent_undo +virtualedit
+cmdline_info    +keymap          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       -python          +vreplace
+cscope          +lispindent      +python3         +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con      +lua             +rightleft       +writebackup
+diff            +menu            +ruby            -X11
+digraphs        +mksession       +scrollbind      -xfontset
-dnd             +modify_fname    +signs           -xim
-ebcdic          +mouse           +smartindent     -xsmp
+emacs_tags      -mouseshape      +startuptime     -xterm_clipboard
+eval            +mouse_dec       +statusline      -xterm_save
+ex_extra        +mouse_gpm       -sun_workshop    -xpm
+extra_search    -mouse_jsbterm   +syntax          
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -lpython3.5m -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm

OS details (with all updates installed):

kvs@bb-v1 ~:> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:    16.04
Codename:   xenial
vheon commented 8 years ago

Looks like #2186

thekvs commented 8 years ago

Yes. And I am also using ROS.

tracyone commented 8 years ago

@thekvs hi,i met the same problem how to solve this problem?

thekvs commented 8 years ago

I've switched to vim-nox-py2 which uses python2

On Sun, Jun 19, 2016 at 4:14 PM, tracyone notifications@github.com wrote:

@thekvs https://github.com/thekvs hi,i met the same problem how to solve this problem?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Valloric/YouCompleteMe/issues/2187#issuecomment-226996675, or mute the thread https://github.com/notifications/unsubscribe/AANTBBUmvGfg6BUFMPVB6TroX9v7VZahks5qNUCegaJpZM4IpBJM .

Konstantin Sorokin