richard1122 / vscode-youcompleteme

YouCompleteMe for VSCode
https://marketplace.visualstudio.com/items?itemName=RichardHe.you-complete-me
MIT License
53 stars 8 forks source link

config file won't load #25

Closed yjlintw closed 7 years ago

yjlintw commented 7 years ago

After I update the editor, YCM doesn't work anymore. Previously, a notification will pop out asking whether I want to load the config file.

VScode: Version 1.10.0-insider (1.10.0-insider)

Below is the debug message.

[onCodeAction] {"textDocument":{"uri":"file:///Users/peacedove/Documents/Learning/Algorithm/practice/src/datastructure/avl.h"},"range":{"start":{"line":19,"character":16},"end":{"line":19,"character":27}},"context":{"diagnostics":[]}}
[buildRequest] document, /Users/peacedove/Documents/Learning/Algorithm/practice/src/datastructure/avl.h; position: [object Object]; event: null
[_request] {"filepath":"/Users/peacedove/Documents/Learning/Algorithm/practice/src/datastructure/avl.h","working_dir":"/Users/peacedove/Documents/Learning/Algorithm/practice","file_data":{"/Users/peacedove/Documents/Learning/Algorithm/practice/src/datastructure/avl.h":{"contents":"","filetypes":["cpp"]}},"line_num":20,"column_num":17,"command_arguments":["FixIt"],"completer_target":"filetype_default"}
[ycm stderr] 2017-02-22 21:47:22,584 - INFO - Received command request

[ycm stderr] Traceback (most recent call last):
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 109, in wrapper
    return callback( *args, **kwargs )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py", line 72, in wrapper
    body = callback( *args, **kwargs )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 82, in RunCompleterCommand
    request_data ) )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 336, in OnUserCommand
    return command( self, request_data, arguments[ 1: ] )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 142, in <lambda>
    self._FixIt( request_data ) ),
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 297, in _FixIt
    flags = self._FlagsForRequest( request_data )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 400, in _FlagsForRequest
    return self._flags.FlagsForFile( filename, client_data = client_data )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/flags.py", line 82, in FlagsForFile
    module = extra_conf_store.ModuleForSourceFile( filename )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 57, in ModuleForSourceFile
    return Load( ModuleFileForSourceFile( filename ) )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 68, in ModuleFileForSourceFile
    if Load( module_file ):
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 154, in Load
    if not force and not _ShouldLoad( module_file ):
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 138, in _ShouldLoad
    raise UnknownExtraConf( module_file )
UnknownExtraConf: Found /Users/peacedove/Documents/Learning/Algorithm/practice/.ycm_extra_conf.py. Load? 

(Question can be turned off with options, see YCM docs)

[_request] status code: 500
[_request] {"exception": {"TYPE": "UnknownExtraConf", "extra_conf_file": "/Users/peacedove/Documents/Learning/Algorithm/practice/.ycm_extra_conf.py"}, "traceback": "Traceback (most recent call last):\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py\", line 861, in _handle\n    return route.call(**args)\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py\", line 1734, in wrapper\n    rv = callback(*a, **ka)\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/watchdog_plugin.py\", line 109, in wrapper\n    return callback( *args, **kwargs )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py\", line 72, in wrapper\n    body = callback( *args, **kwargs )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py\", line 82, in RunCompleterCommand\n    request_data ) )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py\", line 336, in OnUserCommand\n    return command( self, request_data, arguments[ 1: ] )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py\", line 142, in <lambda>\n    self._FixIt( request_data ) ),\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py\", line 297, in _FixIt\n    flags = self._FlagsForRequest( request_data )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py\", line 400, in _FlagsForRequest\n    return self._flags.FlagsForFile( filename, client_data = client_data )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/flags.py\", line 82, in FlagsForFile\n    module = extra_conf_store.ModuleForSourceFile( filename )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py\", line 57, in ModuleForSourceFile\n    return Load( ModuleFileForSourceFile( filename ) )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py\", line 68, in ModuleFileForSourceFile\n    if Load( module_file ):\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py\", line 154, in Load\n    if not force and not _ShouldLoad( module_file ):\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py\", line 138, in _ShouldLoad\n    raise UnknownExtraConf( module_file )\nUnknownExtraConf: Found /Users/peacedove/Documents/Learning/Algorithm/practice/.ycm_extra_conf.py. Load? \n\n(Question can be turned off with options, see YCM docs)\n", "message": "Found /Users/peacedove/Documents/Learning/Algorithm/practice/.ycm_extra_conf.py. Load? \n\n(Question can be turned off with options, see YCM docs)"}
[Error - 9:47:22 PM] Request textDocument/codeAction failed.
  Message: Request textDocument/codeAction failed with message: Network failed
  Code: -32603 
[buildRequest] document, /Users/peacedove/Documents/Learning/Algorithm/practice/src/datastructure/avl.h; position: [object Object]; event: null
[_request] {"filepath":"/Users/peacedove/Documents/Learning/Algorithm/practice/src/datastructure/avl.h","working_dir":"/Users/peacedove/Documents/Learning/Algorithm/practice","file_data":{"/Users/peacedove/Documents/Learning/Algorithm/practice/src/datastructure/avl.h":{"contents":"","filetypes":["cpp"]}},"line_num":21,"column_num":30,"command_arguments":["GetType"],"completer_target":"filetype_default"}
[ycm stderr] 2017-02-22 21:47:23,315 - INFO - Received command request

[ycm stderr] Traceback (most recent call last):
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 861, in _handle
    return route.call(**args)
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1734, in wrapper
    rv = callback(*a, **ka)
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 109, in wrapper
    return callback( *args, **kwargs )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py", line 72, in wrapper
    body = callback( *args, **kwargs )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 82, in RunCompleterCommand
    request_data ) )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 336, in OnUserCommand
    return command( self, request_data, arguments[ 1: ] )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 133, in <lambda>
    self._GetSemanticInfo( request_data, func = 'GetTypeAtLocation' ) ),
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 268, in _GetSemanticInfo
    flags = self._FlagsForRequest( request_data )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py", line 400, in _FlagsForRequest
    return self._flags.FlagsForFile( filename, client_data = client_data )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/flags.py", line 82, in FlagsForFile
    module = extra_conf_store.ModuleForSourceFile( filename )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 57, in ModuleForSourceFile
    return Load( ModuleFileForSourceFile( filename ) )
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 68, in ModuleFileForSourceFile
    if Load( module_file ):
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 154, in Load
    if not force and not _ShouldLoad( module_file ):
  File "/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 138, in _ShouldLoad
    raise UnknownExtraConf( module_file )
UnknownExtraConf: Found /Users/peacedove/Documents/Learning/Algorithm/practice/.ycm_extra_conf.py. Load? 

(Question can be turned off with options, see YCM docs)

[_request] status code: 500
[_request] {"exception": {"TYPE": "UnknownExtraConf", "extra_conf_file": "/Users/peacedove/Documents/Learning/Algorithm/practice/.ycm_extra_conf.py"}, "traceback": "Traceback (most recent call last):\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py\", line 861, in _handle\n    return route.call(**args)\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py\", line 1734, in wrapper\n    rv = callback(*a, **ka)\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/watchdog_plugin.py\", line 109, in wrapper\n    return callback( *args, **kwargs )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py\", line 72, in wrapper\n    body = callback( *args, **kwargs )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py\", line 82, in RunCompleterCommand\n    request_data ) )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py\", line 336, in OnUserCommand\n    return command( self, request_data, arguments[ 1: ] )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py\", line 133, in <lambda>\n    self._GetSemanticInfo( request_data, func = 'GetTypeAtLocation' ) ),\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py\", line 268, in _GetSemanticInfo\n    flags = self._FlagsForRequest( request_data )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/clang_completer.py\", line 400, in _FlagsForRequest\n    return self._flags.FlagsForFile( filename, client_data = client_data )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/cpp/flags.py\", line 82, in FlagsForFile\n    module = extra_conf_store.ModuleForSourceFile( filename )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py\", line 57, in ModuleForSourceFile\n    return Load( ModuleFileForSourceFile( filename ) )\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py\", line 68, in ModuleFileForSourceFile\n    if Load( module_file ):\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py\", line 154, in Load\n    if not force and not _ShouldLoad( module_file ):\n  File \"/Users/peacedove/.yadr/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py\", line 138, in _ShouldLoad\n    raise UnknownExtraConf( module_file )\nUnknownExtraConf: Found /Users/peacedove/Documents/Learning/Algorithm/practice/.ycm_extra_conf.py. Load? \n\n(Question can be turned off with options, see YCM docs)\n", "message": "Found /Users/peacedove/Documents/Learning/Algorithm/practice/.ycm_extra_conf.py. Load? \n\n(Question can be turned off with options, see YCM docs)"}
[onHover error] Error: Network failed
    at ClientRequest.http.request (/Users/peacedove/.vscode-insiders/extensions/RichardHe.you-complete-me-1.0.25/server/ycmRequest.js:56:28)
    at ClientRequest.g (events.js:286:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at HTTPParser.parserOnIncomingClient (_http_client.js:472:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:105:23)
    at Socket.socketOnData (_http_client.js:361:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
yjlintw commented 7 years ago

It works fine on version 1.9.1.

richard1122 commented 7 years ago

Hi, I 've updated v1.0.27 to fix this problem.

Could you please update extension?

Also please update ycmd version to see if this will happen again.

yjlintw commented 7 years ago

It works fine so far after I update both ycmd and this extension. Thank you.