YouCompleteMe icon indicating copy to clipboard operation
YouCompleteMe copied to clipboard

Errors While Loading Plugin in Vim

Open abdelmaged opened this issue 1 year ago • 7 comments

After successful build of ycm, and trying to load the plugin into vim (version 9) using ":packadd YouCompleteMe", I'm getting following error:

Error detected while processing ~/vim/pack/YouCompleteMe/opt/YouCompleteMe/plugin/youcompleteme.vim[301]..function youcompleteme#Enable[44]..<SNR>25_SetUpPython:
line   57:
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "~/bin/python/3.12.4/lib/python3.12/traceback.py", line 745
    f'Ignored error getting __notes__: {_safe_string(e, '__notes__', repr)}']
                                                         ^^^^^^^^^
SyntaxError: f-string: unmatched '('
Error detected while processing ~/.vim/pack/YouCompleteMe/opt/YouCompleteMe/plugin/youcompleteme.vim[301]..function youcompleteme#Enable:
line   50:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'ycm_semantic_highlighting' is not defined
line   51:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'ycm_inlay_hints' is not defined
E858: Eval did not return a valid python object
line   80:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'vimsupport' is not defined
E858: Eval did not return a valid python object
Press ENTER or type command to continue
Error detected while processing function <SNR>25_PollServerReady:
line    1:
Traceback (most recent call last):

OS Version = Centos 7.9

abdelmaged avatar Jul 11 '24 10:07 abdelmaged

Fixed when using vsim + python version 3.10.14 instead of python 3.12.4

abdelmaged avatar Jul 11 '24 12:07 abdelmaged

Ick. Sounds like we have a bug with py 3.12 maybe.

puremourning avatar Jul 11 '24 13:07 puremourning

I think the problem could be in vim itself rather than ycm. Issue appears when using importing traceback on vim without ycm. I've opened this issue on vim https://github.com/vim/vim/issues/15212

abdelmaged avatar Jul 11 '24 13:07 abdelmaged

I have been running YCM on python 3.12 for a while withoutissues.

bstaletic avatar Jul 11 '24 18:07 bstaletic

@abdelmaged Can you try compiling the latest vim from source? I could import socket in latest vim, even with --enable-python3interp=dynamic.

bstaletic avatar Aug 04 '24 14:08 bstaletic

It's working when building vim with --enable-python3interp=dynamic

It seems I was using --enable-python3interp=yes, which produced the errors

abdelmaged avatar Aug 08 '24 22:08 abdelmaged

Works for me with both options. Vim version 9.1.0658.

bstaletic avatar Aug 09 '24 15:08 bstaletic

not YCM issue

puremourning avatar Dec 11 '24 16:12 puremourning