0

For a few days now I always getting the following error when pressing any key in vim:

Error detected while processing "function <SNR>53_OnCursorMovedNormalMode[5]..<SNR>53_OnFileReadyToParse":
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/share/vim-youcompleteme/python/ycm/youcompleteme.py", line 508, in HandleFileParseRequest
    self.NativeFiletypeCompletionUsable() ):
  File "/usr/share/vim-youcompleteme/python/ycm/youcompleteme.py", line 255, in NativeFiletypeCompletionUsable
    self.NativeFiletypeCompletionAvailable() )
  File "/usr/share/vim-youcompleteme/python/ycm/youcompleteme.py", line 250, in NativeFiletypeCompletionAvailable
    vimsupport.CurrentFiletypes() ] )
  File "/usr/share/vim-youcompleteme/python/ycm/youcompleteme.py", line 249, in <listcomp>
    return any( [ self.FiletypeCompleterExistsForFiletype( x ) for x in
  File "/usr/share/vim-youcompleteme/python/ycm/youcompleteme.py", line 240, in FiletypeCompleterExistsForFiletype
    exists_completer = SendCompleterAvailableRequest( filetype )
  File "/usr/share/vim-youcompleteme/python/ycm/client/completer_available_request.py", line 57, in SendCompleterAvailableRequest
    request.Start()
  File "/usr/share/vim-youcompleteme/python/ycm/client/completer_available_request.py", line 45, in Start
    'semantic_completion_available' )
  File "/usr/share/vim-youcompleteme/python/ycm/client/base_request.py", line 81, in PostDataToHandler
    timeout ) )
  File "/usr/share/vim-youcompleteme/python/ycm/client/base_request.py", line 174, in JsonFromFuture
    _ValidateResponseObject( response )
  File "/usr/share/vim-youcompleteme/python/ycm/client/base_request.py", line 203, in _ValidateResponseObject
    their_hmac = ToBytes( b64decode( response.headers[ _HMAC_HEADER ] ) )
  File "/usr/lib/python3/dist-packages/requests/structures.py", line 54, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'x-ycm-hmac'

I'm using vim on Ubuntu 16.04 with the official vim-youcompleteme package.

There are questions with the same problem on stackoverflow here and here, unfortunately without answers.

  • 2
    This problem is very specific to you-complete-me so I think that you'll have more success asking directly to the maintainers of the plugin. To do so you can use their github issue tracker: at least you'll be read by people who use it everyday and who work on it. – statox Jan 11 '17 at 13:58
1

I had a similar problem with the same KeyError (although I don't know the exact error because I was not able to get the full traceback that you did)

I managed to fix it by adding the zesty repo and installing a newer version of youcompleteme

# add zesty repo
echo deb http://archive.ubuntu.com/ubuntu/ zesty main restricted universe multiverse | sudo tee /etc/apt/sources.list.d/zesty.list
sudo apt update

# update only vim-youcompleteme
sudo apt install -y vim-youcompleteme

# remove new repository so there aren't 1000+ packages to upgrade
sudo rm /etc/apt/sources.list.d/zesty.list
sudo apt update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.