LuckyGeck / YcmdCompletion

Sublime Text 3 plugin for C++ code completion and error highlighting, based on Ycmd server
MIT License
41 stars 17 forks source link

Error 'NoneType' object has no attribute 'SendCodeCompletionRequest' #26

Open mulle-nat opened 8 years ago

mulle-nat commented 8 years ago

I built the current ycmd with ./build.py --all, nothing fancy. It built nicely. Then I tried out the YcmdCompletion plugin, with Sublime build 3314 on OS X 10.10.5, but I don't have luck so far.

Here's what the console says:

[YCMD] #### START COMPLETION ####
[Ycmd][Completion] for tmpfile.cpp:8:15
[Ycmd][Completion] Error 'NoneType' object has no attribute 'SendCodeCompletionRequest'
[Ycmd][Notify] tmpfile.cpp
[Ycmd][Notify] Error 'NoneType' object has no attribute 'SendEventNotification'
[Ycmd][Completion] for tmpfile.cpp:8:16
[Ycmd][Completion] Error 'NoneType' object has no attribute 'SendCodeCompletionRequest'

Here's my user config file: ( HMAC edited out)

{
   "HMAC": "<secret>",
   "languages": [ "c", "objc", "cpp", "python"],
   "ycmd_path": "/Volumes/Source/src/unix/ycmd/ycmd",
   "use_auto_start_localserver": 1,
   "python_binary_path": "/usr/local/bin/python"
}

and my environment:

$ which python
/usr/local/bin/python
$ python --version 
Python 2.7.11
$ ls -d /Volumes/Source/src/unix/ycmd/ycmd
/Volumes/Source/src/unix/ycmd/ycmd
$ uname -v
Darwin Kernel Version 14.5.0: Tue Sep  1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64

and the contents of tmpfile.cpp (just in case :)), where the buffer is in C++ mode:

class xxx 
{
public:
   int  x;
};

int  main( void)
{
   xxx  a;

   a.x = 1848;
   return( a.x);
}
directorscut82 commented 7 years ago

for any poor sob still trying: the ycmd_path variable looks for the library & python the scripts in the same path (dah). So you can create soft links from /ycmd to /ycmd/ycmd of all the relevant files (e.g. .so etc). Also at least for ubuntu 16.04 you need soft links for clang in /usr/bin (newer versions add the version number to the bin while the ycmd looks for 'clang' not 'clang++-4.0' etc