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

Can't run after upgrading to Ubuntu 16.04 LTS #2313

Closed
6 of 11 tasks
soolijoo opened this issue Sep 5, 2016 · 14 comments
Closed
6 of 11 tasks

Can't run after upgrading to Ubuntu 16.04 LTS #2313

soolijoo opened this issue Sep 5, 2016 · 14 comments

Comments

@soolijoo
Copy link

soolijoo commented Sep 5, 2016

Issue Prelude

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

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo.
  • If filing a bug report, I have included the output of
    :YcmToggleLogs stderr.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue.
  • I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

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

Hi,

I've just upgraded from Ubuntu 14.04 to 16.04 and this has broken my ycm plugin. I'm a user of ycm, not very familiar with its internal structure, I'm having some trouble following the fixes posted on the forum for this issue and I was wondering if you could help me out?

My vim version info is as follows:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 27 2014 11:44:57) Included patches: 1-417 Compiled by matt@DCJ6422 Normal version without GUI. Features included (+) or not (-): +acl -farsi -mouse_netterm +syntax -arabic +file_in_path -mouse_sgr +tag_binary +autocmd +find_in_path -mouse_sysmouse +tag_old_static -balloon_eval +float -mouse_urxvt -tag_any_white -browse +folding +mouse_xterm -tcl +builtin_terms -footer +multi_byte +terminfo +byte_offset +fork() +multi_lang +termresponse +cindent +gettext -mzscheme +textobjects +clientserver -hangul_input +netbeans_intg +title +clipboard +iconv +path_extra -toolbar +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 -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_interact +eval -mouse_dec +startuptime +xterm_clipboard +ex_extra -mouse_gpm +statusline -xterm_save +extra_search -mouse_jsbterm -sun_workshop -xpm 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/local/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -L/usr/local/lib -Wl,--as-needed -o vim -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl -ldl -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions

Looking around, I found issues [2002] and [2136]. I realise that this is a python2/python3 problem, with (I think) python2 being the default insterpretter under ubuntu 16.04, but default vim compiled with python3 support. I've tried recompiling vim with python2 support (as you can from the above), but I am still getting error messages when I start vim:

`Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
File "", line 1, in
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 34, in
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
from ycm.client.ycmd_keepalive import YcmdKeepalive
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/ycmd_keepalive.py", line 22, in
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
from ycm.client.base_request import BaseRequest
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 20, in
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
import requests
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
File "/home/matt/.vim/bundle/YouCompleteMe/third_party/requests/requests/init.py", line 53, in
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
from .packages.urllib3.contrib import pyopenssl
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
File "/home/matt/.vim/bundle/YouCompleteMe/third_party/requests/requests/packages/urllib3/contrib/pyopenssl.py", line 62, in

Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 26:
AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 27:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 27:
File "", line 1, in
Press ENTER or type command to continue
Error detected while processing function youcompleteme#Enable..22_SetUpPython:
line 27:
NameError: name 'YouCompleteMe' is not defined
`

Since my version of ycm was a couple of years old, I tried updating it using vundle using :PluginInstall!, although vundle is also giving me some error messages:

Error detected while processing function vundle#installer#new..<SNR>23_process..vundle#installer#run..vundle#installer#install..<SNR>23_sync.. <SNR>23_make_sync_command..<SNR>23_get_current_origin_url..<SNR>23_system: line 1: E484: Cannot open file /tmp/vdLMLOr/1 Error detected while processing function vundle#installer#new..<SNR>23_process..vundle#installer#run..vundle#installer#install..<SNR>23_sync: line 6: E714: List required Error detected while processing function vundle#installer#new..<SNR>23_process: line 13: E121: Undefined variable: g:vundle_last_status E15: Invalid expression: 'error' == g:vundle_last_status line 17: E121: Undefined variable: g:vundle_last_status E15: Invalid expression: 'updated' == g:vundle_last_status && empty(msg)

A lot of the information on forum start with going to ~/.vim/bundle/YouCompleteMe and running install.py, but my direction doesn't contain an install.py, just an install.sh.

I'm sure I am being quite stupid here, but can anyone point me in the right direction?

Many thanks,
Matt

[If filing a bug report, please include a list of steps that describe how to
reproduce the bug you are experiencing. Also include test code if relevant.]

@Valloric
Copy link
Member

Valloric commented Sep 5, 2016

Are you using the latest version of YCM?

@soolijoo
Copy link
Author

soolijoo commented Sep 5, 2016

To be honest, I'm not sure. Updated the version I have using vundle but I haven't downloaded anything new from the ycm website. I have the strong impression I am doing some thing wrong...

@micbou
Copy link
Collaborator

micbou commented Sep 5, 2016

@soolijoo Since you can't update YCM through Vundle, go to the ~/.vim/bundle/YouCompleteMe folder and run the following commands:

git pull
git submodule update --init --recursive

The install.py script should now exist. Use it to install YCM. See the instructions in the documentation for more details.

Concerning your Vundle issue, you should search about the error on the Vundle issue tracker. I think this is related to VundleVim/Vundle.vim#175 and this FAQ entry.

@soolijoo
Copy link
Author

soolijoo commented Sep 5, 2016

thanks for this. I've pulled the changes from the git repo, but the submodule update is giving me:
error:

Your local changes to the following files would be overwritten by checkout:
cpp/ycm/.ycm_extra_conf.py
Please, commit your changes or stash them before you can switch branches.
Aborting
Unable to checkout 'b3643cecd7cf152b79d82ca42741969b4d06fc71' in submodule path 'third_party/ycmd'

I have previously made some changes to my ycm_extra_conf.py in line with the installation instructions. I can easily put them back in a fresh script later.

@micbou
Copy link
Collaborator

micbou commented Sep 5, 2016

You should not use YCM own .ycm_extra_conf.py. Copy it to a separate folder (your home for instance), rename it to something else (e.g. .ycm_global_extra_conf.py), and update the g:ycm_global_ycm_extra_conf option in your vimrc to its new path:

let g:ycm_global_ycm_extra_conf = '~/.ycm_global_extra_conf.py'

You can now discard the changes you made to YCM .ycm_extra_conf.py file by moving to the ~/.vim/bundle/YouCompleteMe/third_party/ycmd folder and running the following command:

git checkout -- cpp/ycm/.ycm_extra_conf.py

Then try again to update the submodules (git submodule update --init --recursive) in the YCM folder.

@soolijoo
Copy link
Author

soolijoo commented Sep 5, 2016

Ok, that worked, and I have run setup.py --clang-completer successfully. I'm still getting errors when I use vim to open a c language file, though. About 20 of them, all on line 2. here's a sample:
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "", line 1, in
Press ENTER or type command to continue
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 291, in NativeFiletypeCompletionUsable
Press ENTER or type command to continue
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
self.NativeFiletypeCompletionAvailable() )
Press ENTER or type command to continue

I noticed during the setup that the script found python2.7 -- could this be what's causing the problem?

@micbou
Copy link
Collaborator

micbou commented Sep 5, 2016

Could you paste the full output of the error? Use the :messages command for that.

I noticed during the setup that the script found python2.7 -- could this be what's causing the problem?

No, this is expected on Ubuntu 16.04.

@soolijoo
Copy link
Author

soolijoo commented Sep 6, 2016

Hi Micbou,

Messages are:

"test.c" 14L, 215C Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: Traceback (most recent call last): Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "<string>", line 1, in <module> Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 291, in NativeFiletypeCompletionUsable Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: self.NativeFiletypeCompletionAvailable() ) Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 286, in NativeFiletypeCompletionAvailable Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: vimsupport.CurrentFiletypes() ] ) Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 276, in FiletypeCompleterExistsForFiletype Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: exists_completer = SendCompleterAvailableRequest( filetype ) Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/completer_available_request.py", line 57, in SendCompleterAv ailableRequest Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: request.Start() Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/completer_available_request.py", line 45, in Start Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: 'semantic_completion_available' ) Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 81, in PostDataToHandler Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: timeout ) ) Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 173, in JsonFromFuture Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: response = future.result() Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "/home/matt/.vim/bundle/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 404, in result Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: return self.__get_result() Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: File "/home/matt/.vim/bundle/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 356, in __get_result Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: raise self._exception Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=41681): Max retries exceeded with url: /semantic_complet ion_available (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f63b136da90>: Failed to establish a new connection: [Errno 111] Connection refused',)) Error detected while processing function <SNR>25_SetOmnicompleteFunc..<SNR>25_Pyeval: line 2: E858: Eval did not return a valid python object

@micbou
Copy link
Collaborator

micbou commented Sep 6, 2016

Thanks. Could you check if this line (/semantic_completion_available handler) exists in your YouCompleteMe/third_party/ycmd/handlers.py file?

@soolijoo
Copy link
Author

soolijoo commented Sep 6, 2016

Checking line 164 of file ~/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/handlers.py. This block is:

@app.post( '/semantic_completion_available' ) def FiletypeCompletionAvailable(): _logger.info( 'Received filetype completion available request' ) return _JsonResponse( _server_state.FiletypeCompletionAvailable( RequestWrap( request.json )[ 'filetypes' ] ) )

@micbou
Copy link
Collaborator

micbou commented Sep 8, 2016

Does the error also occur for languages other than C (for instance in Python files)? Do you get the error when running the :YcmDebugInfo command in Vim? If not, could you paste its output?

@soolijoo
Copy link
Author

soolijoo commented Sep 9, 2016

I'm getting a similar set of errors when I start vim with a python file. The output of YcmDebugInfo is:

Printing YouCompleteMe debug information...
-- Server crashed, no debug info from server
-- Server running at: http://127.0.0.1:48421
-- Server process ID: 11002
-- Server logfiles:
-- /tmp/ycm_temp/server_48421_stdout.log
-- /tmp/ycm_temp/server_48421_stderr.log

The startup messages are:
"analysis.py" 834L, 29321C
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
Traceback (most recent call last):
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "", line 1, in
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 291, in NativeFiletypeCompletionUsable
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
self.NativeFiletypeCompletionAvailable() )
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 286, in NativeFiletypeCompletionAvailable
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
vimsupport.CurrentFiletypes() ] )
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 276, in FiletypeCompleterExistsForFiletype
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
exists_completer = SendCompleterAvailableRequest( filetype )
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/completer_available_request.py", line 57, in SendCompleterAv
ailableRequest
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
request.Start()
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/completer_available_request.py", line 45, in Start
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
'semantic_completion_available' )
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 81, in PostDataToHandler
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
timeout ) )
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 173, in JsonFromFuture
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
response = future.result()
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 404, in result
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
return self.__get_result()
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
File "/home/matt/.vim/bundle/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 356, in __get_result
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
raise self._exception
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:
raise self._exception
Error detected while processing function 25_SetOmnicompleteFunc..25_Pyeval:
line 2:

thanks.

@micbou
Copy link
Collaborator

micbou commented Sep 9, 2016

So, the server is crashing. Add the following to your vimrc:

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

Start Vim, reproduce the issue, and type the command :YcmToggleLogs stderr. This should open the server logfile in a new window. Paste its content. If you get an error saying that the logfile cannot be opened or there is nothing in it, paste instead the output of this command:

:py print(ycm_state._server_popen.stderr.read())

@micbou
Copy link
Collaborator

micbou commented Sep 25, 2016

No answer. Closing.

@micbou micbou closed this as completed Sep 25, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants