abingham / emacs-ycmd

Emacs client for ycmd, the code completion system.
MIT License
384 stars 46 forks source link

Ycmd wrong command 'GetType' #428

Closed noxdafox closed 7 years ago

noxdafox commented 7 years ago

Every time I load a new Python file I get this error in the log.

It seems ycmd is sending a wrong command to the server.

2017-05-31 11:04:05,463 - INFO - Adding buffer identifiers for file: /home/noxdafox/asd.py
2017-05-31 11:04:05,478 - INFO - Received command request
Traceback (most recent call last):
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/completers/completer.py", line 331, in OnUserCommand
    command = command_map[ arguments[ 0 ] ]
KeyError: 'GetType'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/noxdafox/development/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)
  File "/home/noxdafox/development/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 108, in wrapper
    return callback( *args, **kwargs )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/hmac_plugin.py", line 70, in wrapper
    body = callback( *args, **kwargs )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/handlers.py", line 85, in RunCompleterCommand
    request_data ) )
  File "/home/noxdafox/development/ycmd/ycmd/../ycmd/completers/completer.py", line 333, in OnUserCommand
    raise ValueError( self.UserCommandsHelpMessage() )
ValueError: Supported commands are:
GetDoc
GoTo
GoToDeclaration
GoToDefinition
GoToReferences
RestartServer
See the docs for information on what they do.

ycmd and emacs-ycmd are up to date.

ptrv commented 7 years ago

The error is probably from ycmd-eldoc, you have it enabled right? Don't worry about it. It's normal. ycmd-eldoc is sending a GetType request if a completion request is not returning any information and if the filetype completer does not support GetType, like python we disable the GetType request for that buffer. But get this error once for a buffer. We could ask the server if GetType is supported before sending the request, so that the error does not pop up. Would be less confusing I guess. I have an experimental branch with this and I'll send a PR as soon as I have time for it.

noxdafox commented 7 years ago

Yes I have it enabled.

I started investigating this issue because all of a sudden I stopped getting parameters completion on ycmd. It used to complete a function altogether with its parameters and now the only thing it reports is the function name.

I can't really wrap my mind about this issue.

Also using C-h in company completion shows a no documentation available message in the minibuffer.

ptrv commented 7 years ago

@noxdafox Regarding parameter completion in python see #431

ycmd (i guess jedi backand) chaged the format for python functions. I missed it since I'm not writing much python at the moment.