I get this error, when starting gvim. This looks very similar to the issue #1281 at https://github.com/Valloric/YouCompleteMe/issues/1281. People in that thread reported that doing "git submodule update --init --recursive" fixed the issue. But not for me. I'd appreciate if someone can help me with this.
Error detected while processing function youcompleteme#Enable..
line 34:
Traceback (most recent call last):
Error detected while processing function youcompleteme#Enable..
line 34:
File "
Error detected while processing function youcompleteme#Enable..
line 34:
File "/root/.vim/bundle/YouCompleteMe/autoload/../third_party/ycmd/ycmd/utils.py", line 277, in SafePopen
Error detected while processing function youcompleteme#Enable..
line 34:
return subprocess.Popen( _args, *_kwargs )
Error detected while processing function youcompleteme#Enable..
line 34:
File "/usr/local/lib/python2.7/subprocess.py", line 710, in init
Error detected while processing function youcompleteme#Enable..
line 34:
errread, errwrite)
Error detected while processing function youcompleteme#Enable..
line 34:
File "/usr/local/lib/python2.7/subprocess.py", line 1335, in _execute_child
Error detected while processing function youcompleteme#Enable..
line 34:
raise child_exception
Error detected while processing function youcompleteme#Enable..
line 34:
OSError: [Errno 2] No such file or directory
Could you check if the file third_party\ycmd\check_core_version.py exists in the YouCompleteMe folder?
Suddenly it started to produce an error here as well, and I do have this file.
Yes, that file exists. I'm still seeing this error.
On Wed, Aug 26, 2015 at 4:12 AM, micbou [email protected] wrote:
Could you check if the file third_party\ycmd\check_core_version.py exists
in the YouCompleteMe folder?—
Reply to this email directly or view it on GitHub
https://github.com/Valloric/YouCompleteMe/issues/1652#issuecomment-134950362
.
Recompiling vim fixed that for me.
I tried reinstalling vim before. After your response, I tried again. Still
no luck for me.
On Wed, Aug 26, 2015 at 10:38 AM, Nick Ostrovsky [email protected]
wrote:
Recompiling vim fixed that for me.
—
Reply to this email directly or view it on GitHub
https://github.com/Valloric/YouCompleteMe/issues/1652#issuecomment-135119280
.
Does anyone have it working with Python 2.7.10? That's the version I have and I was wondering whether it has something to do with my problem.
@dvinothkumar my version is this one on OS X, I have no issues.
@dvinothkumar I have just built it today from tip by the way.
@dvinothkumar
$ python --version
Python 2.7.10
Sorry I wish I could help. It just blew up after I came back from lunch, dunno maybe I did brew update prior. So I just did brew uninstall vim && brew install vim and that fixed it.
I too am having a very similar issue (OS X).
uname -a - Darwin mbp.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64Loading with Plug - Plug 'Valloric/YouCompleteMe', { 'do': './install.sh --clang-completer' }
Error detected while processing function youcompleteme#Enable..<SNR>190_SetUpPython:
line 34:
Traceback (most recent call last):
Error detected while processing function youcompleteme#Enable..<SNR>190_SetUpPython:
line 34:
File "<string>", line 25, in <module>
Error detected while processing function youcompleteme#Enable..<SNR>190_SetUpPython:
line 34:
File "/Users/will/.dotfiles/tag-vim/vim/bundle/YouCompleteMe/autoload/../third_party/ycmd/ycmd/utils.py", line 283, in SafePopen
Error detected while processing function youcompleteme#Enable..<SNR>190_SetUpPython:
line 34:
return subprocess.Popen( args, **kwargs )
Error detected while processing function youcompleteme#Enable..<SNR>190_SetUpPython:
line 34:
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
Error detected while processing function youcompleteme#Enable..<SNR>190_SetUpPython:
line 34:
errread, errwrite)
Error detected while processing function youcompleteme#Enable..<SNR>190_SetUpPython:
line 34:
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
Error detected while processing function youcompleteme#Enable..<SNR>190_SetUpPython:
line 34:
raise child_exception
Error detected while processing function youcompleteme#Enable..<SNR>190_SetUpPython:
line 34:
OSError: [Errno 2] No such file or directory
I think it is because the version of python that was built into your Vim no longer exists.
How did you install Vim? How did you install Python?
I recommend using the system Python on OS X, as that is what is tested by our Travis builds.
Also, do you have g:ycm_path_to_python_interpreter set to anything?
Thank you. Yes, it was a Python installation issue. Python path was
pointing to the wrong location. Once I fixed it, it worked
On Mon, Oct 5, 2015 at 10:28 AM, Ben Jackson [email protected]
wrote:
I think it is because the version of python that was built into your Vim
no longer exists.
How did you install Vim? How did you install Python?I recommend using the system Python on OS X, as that is what is tested by
our Travis builds.—
Reply to this email directly or view it on GitHub
https://github.com/Valloric/YouCompleteMe/issues/1652#issuecomment-145605524
.
I too had g:ycm_path_to_python_interpreter set incorrectly (my arch vars were overriding the OS X ones)
I think this is resolved by ensuring your g:ycm_path_to_python_interpreter is a valid path, so closing. If you don't agree this is resolved, please respond in kind.
can anyone point out how to check that value?
anyone?
Run :echo g:ycm_path_to_python_interpreter
I get blank..nothing.. what it should be?
Type this command in Vim:
:echo pyeval( 'paths.PathToPythonInterpreter()' )
and check if the Python path returned by this command is the right one. If not, set the variable g:ycm_path_to_python_interpreter to the correct path in your vimrc file.
micbou's suggestion fixed this for me:
" Fix Python Path (for YCM)
let g:ycm_path_to_python_interpreter="/usr/bin/python"
https://github.com/Valloric/YouCompleteMe/issues/1652#issuecomment-134950362 no I don't see a file with that name inside that folder, I installed a fresh copy of vim and pulled latest changes from the YouCompleteMe repo, I compiled with clang support.
I get the error
/usr/bin/python: can't open file '/home/naveen/Dropbox/dotfiles/vim/bundle/YouCompleteMe/python/ycm/../../third_party/ycmd/check_core_version.py': [Errno 2] No such file or directory
when I execute gvim command from command line

And the errors in vim as shown in attachment image.
@naveenpanwar is the file really there? what reading right does it have? can be read in vim?
In short:
ls -l /home/naveen/Dropbox/dotfiles/vim/bundle/YouCompleteMe/python/ycm/../../third_party/ycmd/check_core_version.py
echo filereadable('/home/naveen/Dropbox/dotfiles/vim/bundle/YouCompleteMe/python/ycm/../../third_party/ycmd/check_core_version.py')```
I meet the problem on Ubuntu 16.04, I reinstall vim from source solve the problem.
Running ./install.sh inside the ~/.vim/bundle/YouCompleteMe folder fixed my problems.
Uninstalling and installing vim from source with brew fixed it for me:
brew uninstall vim
brew install -s vim
I solved my problem following this thread and adding:
let g:ycm_path_to_python_interpreter="/usr/local/bin/python"
in my .vimrc file.
Thanks to all.
Thank you joaquinalcerro. you are right.
+1 to setting g:ycm_path_to_python_interpreter, just check your python path first with which python
If I set that variable to /usr/bin/python, I was getting same error, for me the problem was default python in my ubuntu16.04 was python2.7, fixed it by setting the g:ycm_path_to_python_interpreter variable to /usr/bin/python3
I solve this problem also. I think just python path error.
I encountered the same problem. But I remembered that I rewrap the python packages with brew some how and then the problem occurred. So a straightforward thought is that it is the path that caused the problem. A simple fix is to re-compile your vim. I did so and dang, the problem solved.
let g:ycm_path_to_python_interpreter="/usr/bin/python" that's works for me!
Most answers in that thread are outdated or unhelpful. Firstly, the g:ycm_path_to_python_interpreter option is deprecated and g:ycm_server_python_interpreter should be used instead. Secondly, suggesting to set this option to some Python interpreter path cannot be the solution for everyone. It depends on how the YCM library was compiled. If the install.py script has been used, setting this option should never be needed as YCM will find the right Python interpreter by reading the file YouCompleteMe/third_party/ycmd/PYTHON_USED_DURING_BUILDING generated by the script. If the full installation instructions has been followed and the server does crash at Vim startup, it may be needed to set this option to the Python used to build the YCM library. Said that, if you are really seeing the message Error detected while processing function youcompleteme#Enable..<SNR>80_SetUpPython at startup, you should raise a new issue (please follow the issue template if you do) so that we can figure it out. Locking the issue.
Most helpful comment
I solved my problem following this thread and adding:
let g:ycm_path_to_python_interpreter="/usr/local/bin/python"
in my .vimrc file.
Thanks to all.