Skip to content

Conversation

@ferozco
Copy link
Contributor

@ferozco ferozco commented Feb 15, 2018

Previously we had a single thread that would handle and subsequently respond to each message in order. This presented performance problems since long running handlers would cause the server to hang from the perspective of the client. Furthermore, prevented a handler from sending (and receiving) multiple message.

This change allows handlers to be executed either synchronously or asynchronously with the choice being left to the specific hookimpl.

@ferozco ferozco requested a review from gatesn February 15, 2018 10:56
@gatesn
Copy link
Contributor

gatesn commented Feb 16, 2018

@evandrocoan @tomv564 @lgeiger as regular contributors, wanted to get your thoughts on this PR. One notable regression is the lack of batch JSON RPC support, are you aware of this impacting any clients?

@ferozco
Copy link
Contributor Author

ferozco commented Feb 16, 2018

I didn't want the lack of batch requests to be a blocker, so I went ahead and added support for them

@evandrocoan
Copy link
Contributor

I just merged this into my master and started my LSP client:

[LSP] starting ['pyls', '-vvv', '--log-file', 'F:/SublimeText/debug2.txt'], working_dir: F:\SublimeText\Data
[LSP]  --> initialize
2018-02-16 14:38:11,110 INFO pyls.python_ls:start_io_lang_server:57 Starting PythonLanguageServer IO language server
[LSP] server: Traceback (most recent call last):
[LSP] server: File "F:\Python\Scripts\pyls-script.py", line 11, in <module>
[LSP] server: load_entry_point('python-language-server', 'console_scripts', 'pyls')()
[LSP] server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\__main__.py", line 59, in main
[LSP] server: start_io_lang_server(stdin, stdout, PythonLanguageServer)
[LSP] server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\python_ls.py", line 59, in start_io_lang_server
[LSP] server: server.start()
[LSP] server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\python_ls.py", line 85, in start
[LSP] server: self.rpc_manager.start()
[LSP] server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\rpc_manager.py", line 42, in start
[LSP] server: self.consume_requests()
[LSP] server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\rpc_manager.py", line 103, in consume_requests
[LSP] server: self._handle_request(message)
[LSP] server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\rpc_manager.py", line 120, in _handle_request
[LSP] server: maybe_handler = self._message_handler(request.method, params)
[LSP] server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\python_ls.py", line 103, in handle_request
[LSP] server: return getattr(self, method_call)(**params)
[LSP] server: TypeError: m_initialize() got an unexpected keyword argument 'capabilities'
File: python-language-server/pyls/python_ls.py
 87:     def handle_request(self, method, params):
 88:         """Provides callables to handle requests or responses to those reqeuests
 89: 
 90:         Args:
 91:             method (str): name of the message
 92:             params (dict): body of the message
 93: 
 94:         Returns:
 95:             Callable if method is to be handled
 96: 
 97:         Raises:
 98:             KeyError: Handler for method is not found
 99:         """
100: 
101:         method_call = 'm_{}'.format(_method_to_string(method))
102:         if hasattr(self, method_call):
103:             return getattr(self, method_call)(**params)
104:         elif self._dispatchers:

@ferozco
Copy link
Contributor Author

ferozco commented Feb 16, 2018

@evandrocoan are you sure you have latest? https://github.com/palantir/python-language-server/pull/261/files#diff-f68667852a14e9f761f6ebf07ba02fc8R138 would indicate that it can handle extra keyword args

@evandrocoan
Copy link
Contributor

Sorry, I though this was on your fork, but it is directly put on the upstream.

@evandrocoan
Copy link
Contributor

@ferozco, I noticed you seem to have fixed #250 now, how can I access the language server configuration:

File: python-language-server/pyls/python_ls.py
147:     def m_initialize(self, processId=None, rootUri=None, rootPath=None, initializationOptions=None, **_kwargs):
148:         log.debug('Language server initialized with %s %s %s %s', processId, rootUri, rootPath, initializationOptions)
149:         if rootUri is None:
150:             rootUri = uris.from_fs_path(rootPath) if rootPath is not None else ''
151: 
152:         self.config = config.Config(rootUri, initializationOptions or {})
153:         self.workspace = Workspace(rootUri, rpc_manager=self.rpc_manager)

from the Workspace class constructor?

I this would be required to fix #256

Currently on my Workspace constructor I have this:

File: python-language-server/pyls/workspace.py
77:     def __init__(self, root_uri, rpc_manager=None):
78:         self._root_uri = root_uri
79:         self._rpc_manager = rpc_manager
80:         self._root_uri_scheme = uris.urlparse(self._root_uri)[0]
81:         self._root_path = uris.to_fs_path(self._root_uri)
82:         self._docs = {}
83: 
84:         # Whilst incubating, keep private
85:         if self._rpc_manager.config.plugin_settings('rope').get('create_folder', False):
86:             self.__rope = Project(self._root_path)
87:         else:
88:             self.__rope = Project(self._root_path, ropefolder=None)
89:         self.__rope.prefs.set('extension_modules', self.PRELOADED_MODULES)

This way, you can fix #179 once we load the client configurations before the creating the Workspace() object.

@ferozco
Copy link
Contributor Author

ferozco commented Feb 16, 2018

One could argue that the config should just live within the workspace. In this world the language server just becomes a dumb dispatcher. The workspace would then be responsible for loading plugins etc. thoughts @gatesn?

I think something like that is outside of the scope of this PR (which already pretty large)

@evandrocoan
Copy link
Contributor

Perhaps we should keep a class diagram somewhere like using https://github.com/plantuml/plantum

For now, I used pyreverse from pylint package to generate it with pyreverse -o png -p Pyreverse pyls

classes_pyreverse

packages_pyreverse

Putting the config attribute from PythonLanguageServer into the Workspace could be possible because it should still be accessible from the PythonLanguageServer class as it has the Workspace as an attribute.

The old problem still #256 because would make no difference for #179 as we need to already have loaded the user configuration while instantiating the RopeProject on the Workspace constructor.

@evandrocoan
Copy link
Contributor

evandrocoan commented Feb 16, 2018

@ferozco, now I got this from my client:

[LSP] 16:45:54:540.602922  --> textDocument/didOpen
[LSP] 16:45:54:549.612045 Error handling server payload
Traceback (most recent call last):
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 322, in receive_payload
    self.response_handler(payload)
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 335, in response_handler
    handler_id = int(response.get("id"))  # dotty sends strings back :(
TypeError: int() argument must be a string or a number, not 'NoneType'

This is the log within this so far:

[LSP] 16:45:19:136.095047 starting ['pyls', '-vvv', '--log-file', 'F:/SublimeText/debug2.txt'], working_dir: F:\SublimeText\Data
[LSP] 16:45:19:144.603968  --> initialize
2018-02-16 16:45:52,316 INFO pyls.python_ls:start_io_lang_server:57 Starting PythonLanguageServer IO language server
2018-02-16 16:45:52,330 DEBUG pyls.python_ls:m_initialize:148 Language server initialized with 9308 file:///F:/SublimeText/Data F:\SublimeText\Data None
2018-02-16 16:45:54,065 INFO pyls.config.config:__init__:39 Loaded pyls plugin jedi_completion from <module 'pyls.plugins.jedi_completion' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\jedi_completion.py'>
2018-02-16 16:45:54,070 INFO pyls.config.config:__init__:39 Loaded pyls plugin jedi_definition from <module 'pyls.plugins.definition' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\definition.py'>
2018-02-16 16:45:54,074 INFO pyls.config.config:__init__:39 Loaded pyls plugin jedi_hover from <module 'pyls.plugins.hover' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\hover.py'>
2018-02-16 16:45:54,078 INFO pyls.config.config:__init__:39 Loaded pyls plugin jedi_references from <module 'pyls.plugins.references' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\references.py'>
2018-02-16 16:45:54,082 INFO pyls.config.config:__init__:39 Loaded pyls plugin jedi_signature_help from <module 'pyls.plugins.signature' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\signature.py'>
2018-02-16 16:45:54,100 INFO pyls.config.config:__init__:39 Loaded pyls plugin jedi_symbols from <module 'pyls.plugins.symbols' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\symbols.py'>
2018-02-16 16:45:54,109 INFO pyls.config.config:__init__:39 Loaded pyls plugin mccabe from <module 'pyls.plugins.mccabe_lint' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\mccabe_lint.py'>
2018-02-16 16:45:54,121 INFO pyls.config.config:__init__:39 Loaded pyls plugin pycodestyle from <module 'pyls.plugins.pycodestyle_lint' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\pycodestyle_lint.py'>
2018-02-16 16:45:54,126 INFO pyls.config.config:__init__:39 Loaded pyls plugin pydocstyle from <module 'pyls.plugins.pydocstyle_lint' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\pydocstyle_lint.py'>
2018-02-16 16:45:54,142 INFO pyls.config.config:__init__:39 Loaded pyls plugin pyflakes from <module 'pyls.plugins.pyflakes_lint' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\pyflakes_lint.py'>
2018-02-16 16:45:54,155 INFO pyls.config.config:__init__:39 Loaded pyls plugin rope_completion from <module 'pyls.plugins.rope_completion' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\rope_completion.py'>
2018-02-16 16:45:54,160 INFO pyls.config.config:__init__:39 Loaded pyls plugin rope_rename from <module 'pyls.plugins.rope_rename' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\rope_rename.py'>
2018-02-16 16:45:54,175 INFO pyls.config.config:__init__:39 Loaded pyls plugin yapf from <module 'pyls.plugins.format' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\format.py'>
2018-02-16 16:45:54,180 DEBUG pyls.config.config:processmessage:137   pyls_settings [hook]
      config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {}, _plugin_settings: {}, _disabled_plugins: [], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}

2018-02-16 16:45:54,187 DEBUG pyls.config.config:processmessage:137   finish pyls_settings --> [{'plugins': {'rope_completion': {'enabled': False}}}, {'plugins': {'pydocstyle': {'enabled': False}}}] [hook]

2018-02-16 16:45:54,362 DEBUG pyls.python_ls:_hook:115 PythonLanguageServer, self.config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
2018-02-16 16:45:54,388 DEBUG pyls.config.config:processmessage:137   pyls_dispatchers [hook]
      config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
      workspace: Workspace. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _root_uri_scheme: file, _rpc_manager: JSONRPCManager. _message_manager: <pyls.json_rpc_server.JSONRPCServer object at 0x000001D742109B00>, _message_handler: <bound method PythonLanguageServer.handle_request of <pyls.python_ls.PythonLanguageServer object at 0x000001D742835860>>, _shutdown: False, _sent_requests: {}, _received_requests: {}, _executor_service: <concurrent.futures.thread.ThreadPoolExecutor object at 0x000001D7434EDF60>, __rope: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}
      document: None

2018-02-16 16:45:54,400 DEBUG pyls.config.config:processmessage:137   finish pyls_dispatchers --> [] [hook]

2018-02-16 16:45:54,404 DEBUG pyls.python_ls:_hook:115 PythonLanguageServer, self.config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
2018-02-16 16:45:54,409 DEBUG pyls.config.config:processmessage:137   pyls_initialize [hook]
      config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
      workspace: Workspace. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _root_uri_scheme: file, _rpc_manager: JSONRPCManager. _message_manager: <pyls.json_rpc_server.JSONRPCServer object at 0x000001D742109B00>, _message_handler: <bound method PythonLanguageServer.handle_request of <pyls.python_ls.PythonLanguageServer object at 0x000001D742835860>>, _shutdown: False, _sent_requests: {}, _received_requests: {}, _executor_service: <concurrent.futures.thread.ThreadPoolExecutor object at 0x000001D7434EDF60>, __rope: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}
      document: None

2018-02-16 16:45:54,414 DEBUG pyls.config.config:processmessage:137   finish pyls_initialize --> [] [hook]

2018-02-16 16:45:54,420 DEBUG pyls.python_ls:_hook:115 PythonLanguageServer, self.config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
2018-02-16 16:45:54,425 DEBUG pyls.config.config:processmessage:137   pyls_commands [hook]
      config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
      workspace: Workspace. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _root_uri_scheme: file, _rpc_manager: JSONRPCManager. _message_manager: <pyls.json_rpc_server.JSONRPCServer object at 0x000001D742109B00>, _message_handler: <bound method PythonLanguageServer.handle_request of <pyls.python_ls.PythonLanguageServer object at 0x000001D742835860>>, _shutdown: False, _sent_requests: {}, _received_requests: {}, _executor_service: <concurrent.futures.thread.ThreadPoolExecutor object at 0x000001D7434EDF60>, __rope: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}
      document: None

2018-02-16 16:45:54,432 DEBUG pyls.config.config:processmessage:137   finish pyls_commands --> [] [hook]

2018-02-16 16:45:54,438 DEBUG pyls.python_ls:_hook:115 PythonLanguageServer, self.config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
2018-02-16 16:45:54,457 DEBUG pyls.config.config:processmessage:137   pyls_experimental_capabilities [hook]
      config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
      workspace: Workspace. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _root_uri_scheme: file, _rpc_manager: JSONRPCManager. _message_manager: <pyls.json_rpc_server.JSONRPCServer object at 0x000001D742109B00>, _message_handler: <bound method PythonLanguageServer.handle_request of <pyls.python_ls.PythonLanguageServer object at 0x000001D742835860>>, _shutdown: False, _sent_requests: {}, _received_requests: {}, _executor_service: <concurrent.futures.thread.ThreadPoolExecutor object at 0x000001D7434EDF60>, __rope: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}
      document: None

2018-02-16 16:45:54,468 DEBUG pyls.config.config:processmessage:137   finish pyls_experimental_capabilities --> [] [hook]

2018-02-16 16:45:54,473 INFO pyls.python_ls:capabilities:144 Server capabilities: {'codeActionProvider': True, 'codeLensProvider': {'resolveProvider': False}, 'completionProvider': {'resolveProvider': False, 'triggerCharacters': ['.']}, 'documentFormattingProvider': True, 'documentRangeFormattingProvider': True, 'documentSymbolProvider': True, 'definitionProvider': True, 'executeCommandProvider': {'commands': []}, 'hoverProvider': True, 'referencesProvider': True, 'renameProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',']}, 'textDocumentSync': 2, 'experimental': {}}
2018-02-16 16:45:54,479 DEBUG pyls.rpc_manager:_handle_request:131 Sync request 1
2018-02-16 16:45:54,487 DEBUG pyls.json_rpc_server:write_message:82 Sending <jsonrpc.jsonrpc2.JSONRPC20Response object at 0x000001D744754EF0>
[LSP] 16:45:54:496.061087  --> initialized
[LSP] 16:45:54:498.564005  --> workspace/didChangeConfiguration
[LSP] 16:45:54:499.563932 pyls client registered for window 2
2018-02-16 16:45:54,497 DEBUG pyls.rpc_manager:_handle_request:122 No handler found for initialized
2018-02-16 16:45:54,503 DEBUG pyls.json_rpc_server:write_message:82 Sending <jsonrpc.jsonrpc2.JSONRPC20Response object at 0x000001D7443F56D8>
2018-02-16 16:45:54,508 INFO pyls.config.config:update:116 Updated settings to {'plugins': {'pydocstyle': {'enabled': True, 'ignore': ['D202', 'D208']}, 'pycodestyle': {'enabled': False}, 'rope': {'create_folder': False}}}
2018-02-16 16:45:54,512 INFO pyls.config.config:update:123 Disabled plugins: [<module 'pyls.plugins.pycodestyle_lint' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\pycodestyle_lint.py'>]
[LSP] 16:45:54:540.602922  --> textDocument/didOpen
[LSP] 16:45:54:549.612045 Error handling server payload
Traceback (most recent call last):
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 322, in receive_payload
    self.response_handler(payload)
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 335, in response_handler
    handler_id = int(response.get("id"))  # dotty sends strings back :(
TypeError: int() argument must be a string or a number, not 'NoneType'
2018-02-16 16:45:54,551 DEBUG pyls.python_ls:_hook:115 PythonLanguageServer, self.config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {'plugins': {'pydocstyle': {'enabled': True, 'ignore': ['D202', 'D208']}, 'pycodestyle': {'enabled': False}, 'rope': {'create_folder': False}}}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [<module 'pyls.plugins.pycodestyle_lint' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\pycodestyle_lint.py'>], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
2018-02-16 16:45:54,583 DEBUG pyls.config.config:processmessage:137   pyls_document_did_open [hook]
      config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {'plugins': {'pydocstyle': {'enabled': True, 'ignore': ['D202', 'D208']}, 'pycodestyle': {'enabled': False}, 'rope': {'create_folder': False}}}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [<module 'pyls.plugins.pycodestyle_lint' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\pycodestyle_lint.py'>], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
      workspace: Workspace. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _root_uri_scheme: file, _rpc_manager: JSONRPCManager. _message_manager: <pyls.json_rpc_server.JSONRPCServer object at 0x000001D742109B00>, _message_handler: <bound method PythonLanguageServer.handle_request of <pyls.python_ls.PythonLanguageServer object at 0x000001D742835860>>, _shutdown: False, _sent_requests: {}, _received_requests: {}, _executor_service: <concurrent.futures.thread.ThreadPoolExecutor object at 0x000001D7434EDF60>, __rope: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}, _docs(file:///F:/SublimeText/Data/Packages/Amxmodx/Amxmodx.py): Document. uri: file:///F:/SublimeText/Data/Packages/Amxmodx/Amxmodx.py, version: 0, path: f:\SublimeText\Data\Packages\Amxmodx\Amxmodx.py, filename: Amxmodx.py, _local: True, _extra_sys_path: [], _rope_project: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}
      document: Document. uri: file:///F:/SublimeText/Data/Packages/Amxmodx/Amxmodx.py, version: 0, path: f:\SublimeText\Data\Packages\Amxmodx\Amxmodx.py, filename: Amxmodx.py, _local: True, _extra_sys_path: [], _rope_project: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}

2018-02-16 16:45:54,590 DEBUG pyls.config.config:processmessage:137   finish pyls_document_did_open --> [] [hook]

2018-02-16 16:45:55,110 DEBUG pyls.python_ls:_hook:115 PythonLanguageServer, self.config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {'plugins': {'pydocstyle': {'enabled': True, 'ignore': ['D202', 'D208']}, 'pycodestyle': {'enabled': False}, 'rope': {'create_folder': False}}}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [<module 'pyls.plugins.pycodestyle_lint' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\pycodestyle_lint.py'>], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
2018-02-16 16:45:55,124 DEBUG pyls.config.config:processmessage:137   pyls_lint [hook]
      config: Config. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _init_opts: {}, _settings: {'plugins': {'pydocstyle': {'enabled': True, 'ignore': ['D202', 'D208']}, 'pycodestyle': {'enabled': False}, 'rope': {'create_folder': False}}}, _plugin_settings: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}, _disabled_plugins: [<module 'pyls.plugins.pycodestyle_lint' from 'd:\\user\\dropbox\\softwareversioning\\python-language-server\\pyls\\plugins\\pycodestyle_lint.py'>], _config_sources(flake8): Flake8Config. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}, _config_sources(pycodestyle): PyCodeStyleConfig. root_path: f:\SublimeText\Data, is_windows: True, xdg_home: C:\Users\Professional/.config, _modified_times: {}
      workspace: Workspace. _root_path: f:\SublimeText\Data, _root_uri: file:///F:/SublimeText/Data, _root_uri_scheme: file, _rpc_manager: JSONRPCManager. _message_manager: <pyls.json_rpc_server.JSONRPCServer object at 0x000001D742109B00>, _message_handler: <bound method PythonLanguageServer.handle_request of <pyls.python_ls.PythonLanguageServer object at 0x000001D742835860>>, _shutdown: False, _sent_requests: {}, _received_requests: {}, _executor_service: <concurrent.futures.thread.ThreadPoolExecutor object at 0x000001D7434EDF60>, __rope: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}, _docs(file:///F:/SublimeText/Data/Packages/Amxmodx/Amxmodx.py): Document. uri: file:///F:/SublimeText/Data/Packages/Amxmodx/Amxmodx.py, version: 0, path: f:\SublimeText\Data\Packages\Amxmodx\Amxmodx.py, filename: Amxmodx.py, _local: True, _extra_sys_path: [], _rope_project: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}
      document: Document. uri: file:///F:/SublimeText/Data/Packages/Amxmodx/Amxmodx.py, version: 0, path: f:\SublimeText\Data\Packages\Amxmodx\Amxmodx.py, filename: Amxmodx.py, _local: True, _extra_sys_path: [], _rope_project: Project. _address: f:\SublimeText\Data, _ropefolder_name: None, ignored: _ResourceMatcher. patterns: [], file_list: None, prefs: Prefs. {}, callbacks: {'ignored_resources': <bound method _ResourceMatcher.set_patterns of <rope.base.resources._ResourceMatcher object at 0x000001D744686748>>}

2018-02-16 16:45:57,724 DEBUG pyls.plugins.pydocstyle_lint:pyls_lint:46 Got pydocstyle errors: [{'source': 'pydocstyle', 'code': 'D100', 'message': 'D100: Missing docstring in public module', 'severity': 2, 'range': {'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 29, 'character': 0}, 'end': {'line': 29, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 38, 'character': 0}, 'end': {'line': 38, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 58, 'character': 0}, 'end': {'line': 58, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 64, 'character': 0}, 'end': {'line': 64, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 74, 'character': 0}, 'end': {'line': 74, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 83, 'character': 0}, 'end': {'line': 83, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 99, 'character': 0}, 'end': {'line': 99, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 108, 'character': 0}, 'end': {'line': 108, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 109, 'character': 0}, 'end': {'line': 109, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 113, 'character': 0}, 'end': {'line': 113, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 114, 'character': 0}, 'end': {'line': 114, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 118, 'character': 0}, 'end': {'line': 118, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 130, 'character': 0}, 'end': {'line': 130, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 134, 'character': 0}, 'end': {'line': 134, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 136, 'character': 0}, 'end': {'line': 136, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 156, 'character': 0}, 'end': {'line': 156, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 157, 'character': 0}, 'end': {'line': 157, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 178, 'character': 0}, 'end': {'line': 178, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 179, 'character': 0}, 'end': {'line': 179, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 184, 'character': 0}, 'end': {'line': 184, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 194, 'character': 0}, 'end': {'line': 194, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 212, 'character': 0}, 'end': {'line': 212, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 249, 'character': 0}, 'end': {'line': 249, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 310, 'character': 0}, 'end': {'line': 310, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 329, 'character': 0}, 'end': {'line': 329, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 348, 'character': 0}, 'end': {'line': 348, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 351, 'character': 0}, 'end': {'line': 351, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 354, 'character': 0}, 'end': {'line': 354, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 357, 'character': 0}, 'end': {'line': 357, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 362, 'character': 0}, 'end': {'line': 362, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D205', 'message': 'D205: 1 blank line required between summary line and description (found 0)', 'severity': 2, 'range': {'start': {'line': 372, 'character': 0}, 'end': {'line': 372, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 372, 'character': 0}, 'end': {'line': 372, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood; try rephrasing (found 'This')", 'severity': 2, 'range': {'start': {'line': 372, 'character': 0}, 'end': {'line': 372, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 422, 'character': 0}, 'end': {'line': 422, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 458, 'character': 0}, 'end': {'line': 458, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 471, 'character': 0}, 'end': {'line': 471, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 482, 'character': 0}, 'end': {'line': 482, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 486, 'character': 0}, 'end': {'line': 486, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 543, 'character': 0}, 'end': {'line': 543, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 566, 'character': 0}, 'end': {'line': 566, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 573, 'character': 0}, 'end': {'line': 573, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 591, 'character': 0}, 'end': {'line': 591, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D200', 'message': 'D200: One-line docstring should fit on one line with quotes (found 3)', 'severity': 2, 'range': {'start': {'line': 605, 'character': 0}, 'end': {'line': 605, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 605, 'character': 0}, 'end': {'line': 605, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 614, 'character': 0}, 'end': {'line': 614, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D205', 'message': 'D205: 1 blank line required between summary line and description (found 0)', 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D400', 'message': "D400: First line should end with a period (not 'x')", 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood; try rephrasing (found 'The')", 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 638, 'character': 0}, 'end': {'line': 638, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 643, 'character': 0}, 'end': {'line': 643, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 644, 'character': 0}, 'end': {'line': 644, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 647, 'character': 0}, 'end': {'line': 647, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 650, 'character': 0}, 'end': {'line': 650, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 653, 'character': 0}, 'end': {'line': 653, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 656, 'character': 0}, 'end': {'line': 656, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 660, 'character': 0}, 'end': {'line': 660, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 670, 'character': 0}, 'end': {'line': 670, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 673, 'character': 0}, 'end': {'line': 673, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 674, 'character': 0}, 'end': {'line': 674, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 690, 'character': 0}, 'end': {'line': 690, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 709, 'character': 0}, 'end': {'line': 709, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 729, 'character': 0}, 'end': {'line': 729, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 755, 'character': 0}, 'end': {'line': 755, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D202', 'message': 'D202: No blank lines allowed after function docstring (found 1)', 'severity': 2, 'range': {'start': {'line': 766, 'character': 0}, 'end': {'line': 766, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 766, 'character': 0}, 'end': {'line': 766, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood; try rephrasing (found 'Here')", 'severity': 2, 'range': {'start': {'line': 766, 'character': 0}, 'end': {'line': 766, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 788, 'character': 0}, 'end': {'line': 788, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 790, 'character': 0}, 'end': {'line': 790, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 807, 'character': 0}, 'end': {'line': 807, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 811, 'character': 0}, 'end': {'line': 811, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 818, 'character': 0}, 'end': {'line': 818, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 826, 'character': 0}, 'end': {'line': 826, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 828, 'character': 0}, 'end': {'line': 828, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 832, 'character': 0}, 'end': {'line': 832, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 847, 'character': 0}, 'end': {'line': 847, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 849, 'character': 0}, 'end': {'line': 849, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D200', 'message': 'D200: One-line docstring should fit on one line with quotes (found 3)', 'severity': 2, 'range': {'start': {'line': 855, 'character': 0}, 'end': {'line': 855, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 855, 'character': 0}, 'end': {'line': 855, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 900, 'character': 0}, 'end': {'line': 900, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 937, 'character': 0}, 'end': {'line': 937, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 951, 'character': 0}, 'end': {'line': 951, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 988, 'character': 0}, 'end': {'line': 988, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1164, 'character': 0}, 'end': {'line': 1164, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1172, 'character': 0}, 'end': {'line': 1172, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1181, 'character': 0}, 'end': {'line': 1181, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1194, 'character': 0}, 'end': {'line': 1194, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1204, 'character': 0}, 'end': {'line': 1204, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D202', 'message': 'D202: No blank lines allowed after function docstring (found 1)', 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D205', 'message': 'D205: 1 blank line required between summary line and description (found 0)', 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D400', 'message': "D400: First line should end with a period (not 't')", 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood ('Use', not 'Used')", 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1232, 'character': 0}, 'end': {'line': 1232, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1283, 'character': 0}, 'end': {'line': 1283, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1322, 'character': 0}, 'end': {'line': 1322, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1346, 'character': 0}, 'end': {'line': 1346, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1452, 'character': 0}, 'end': {'line': 1452, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1493, 'character': 0}, 'end': {'line': 1493, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1553, 'character': 0}, 'end': {'line': 1553, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1619, 'character': 0}, 'end': {'line': 1619, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1626, 'character': 0}, 'end': {'line': 1626, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1632, 'character': 0}, 'end': {'line': 1632, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1698, 'character': 0}, 'end': {'line': 1698, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1715, 'character': 0}, 'end': {'line': 1715, 'character': 32}}}]
2018-02-16 16:45:57,735 DEBUG pyls.config.config:settings:87 Got user config from PyCodeStyleConfig: {}
2018-02-16 16:45:57,739 DEBUG pyls.config.config:settings:89 With user configuration: {}
2018-02-16 16:45:57,744 DEBUG pyls.config.config:settings:92 With plugin configuration: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}
2018-02-16 16:45:57,772 DEBUG pyls.config.config:settings:95 With lsp configuration: {'plugins': {'rope_completion': {'enabled': False}, 'rope': {'create_folder': False}, 'pycodestyle': {'enabled': False}, 'pydocstyle': {'enabled': True, 'ignore': ['D202', 'D208']}}}
2018-02-16 16:45:57,782 DEBUG pyls.config.source:read_config_from_files:52 Using cached configuration for ()
2018-02-16 16:45:57,788 DEBUG pyls.config.config:settings:100 Got project config from PyCodeStyleConfig: {}
2018-02-16 16:45:57,795 DEBUG pyls.config.config:settings:102 With project configuration: {'plugins': {'rope_completion': {'enabled': False}, 'rope': {'create_folder': False}, 'pycodestyle': {'enabled': False}, 'pydocstyle': {'enabled': True, 'ignore': ['D202', 'D208']}}}
2018-02-16 16:45:57,801 DEBUG pyls.plugins.mccabe_lint:pyls_lint:16 Running mccabe lint with threshold: 15
2018-02-16 16:45:58,028 DEBUG pyls.config.config:processmessage:137   finish pyls_lint --> [[{'source': 'pyflakes', 'range': {'start': {'line': 4, 'character': 0}, 'end': {'line': 4, 'character': 14}}, 'message': "'string' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 10, 'character': 0}, 'end': {'line': 10, 'character': 22}}, 'message': "'urllib.request' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 11, 'character': 0}, 'end': {'line': 11, 'character': 49}}, 'message': "'collections.defaultdict' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 11, 'character': 0}, 'end': {'line': 11, 'character': 49}}, 'message': "'collections.OrderedDict' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 12, 'character': 0}, 'end': {'line': 12, 'character': 20}}, 'message': "'from queue import *' used; unable to detect undefined names", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 13, 'character': 0}, 'end': {'line': 13, 'character': 36}}, 'message': "'threading.Thread' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 21, 'character': 0}, 'end': {'line': 21, 'character': 29}}, 'message': "'os.path.basename' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 820, 'character': 21}, 'end': {'line': 820, 'character': 27}}, 'message': "'node' may be undefined, or defined from star imports: queue", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1293, 'character': 3}, 'end': {'line': 1293, 'character': 20}}, 'message': "local variable 'count' is assigned to but never used", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1356, 'character': 2}, 'end': {'line': 1356, 'character': 10}}, 'message': "local variable 'pos' is assigned to but never used", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1692, 'character': 6}, 'end': {'line': 1692, 'character': 34}}, 'message': "'LOG_FILE_NAME' may be undefined, or defined from star imports: queue", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1693, 'character': 54}, 'end': {'line': 1693, 'character': 70}}, 'message': "'LOG_FILE_NAME' may be undefined, or defined from star imports: queue", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1696, 'character': 31}, 'end': {'line': 1696, 'character': 102}}, 'message': "'LOG_FILE_NAME' may be undefined, or defined from star imports: queue", 'severity': 2}], [{'source': 'pydocstyle', 'code': 'D100', 'message': 'D100: Missing docstring in public module', 'severity': 2, 'range': {'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 29, 'character': 0}, 'end': {'line': 29, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 38, 'character': 0}, 'end': {'line': 38, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 58, 'character': 0}, 'end': {'line': 58, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 64, 'character': 0}, 'end': {'line': 64, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 74, 'character': 0}, 'end': {'line': 74, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 83, 'character': 0}, 'end': {'line': 83, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 99, 'character': 0}, 'end': {'line': 99, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 108, 'character': 0}, 'end': {'line': 108, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 109, 'character': 0}, 'end': {'line': 109, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 113, 'character': 0}, 'end': {'line': 113, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 114, 'character': 0}, 'end': {'line': 114, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 118, 'character': 0}, 'end': {'line': 118, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 130, 'character': 0}, 'end': {'line': 130, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 134, 'character': 0}, 'end': {'line': 134, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 136, 'character': 0}, 'end': {'line': 136, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 156, 'character': 0}, 'end': {'line': 156, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 157, 'character': 0}, 'end': {'line': 157, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 178, 'character': 0}, 'end': {'line': 178, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 179, 'character': 0}, 'end': {'line': 179, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 184, 'character': 0}, 'end': {'line': 184, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 194, 'character': 0}, 'end': {'line': 194, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 212, 'character': 0}, 'end': {'line': 212, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 249, 'character': 0}, 'end': {'line': 249, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 310, 'character': 0}, 'end': {'line': 310, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 329, 'character': 0}, 'end': {'line': 329, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 348, 'character': 0}, 'end': {'line': 348, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 351, 'character': 0}, 'end': {'line': 351, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 354, 'character': 0}, 'end': {'line': 354, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 357, 'character': 0}, 'end': {'line': 357, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 362, 'character': 0}, 'end': {'line': 362, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D205', 'message': 'D205: 1 blank line required between summary line and description (found 0)', 'severity': 2, 'range': {'start': {'line': 372, 'character': 0}, 'end': {'line': 372, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 372, 'character': 0}, 'end': {'line': 372, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood; try rephrasing (found 'This')", 'severity': 2, 'range': {'start': {'line': 372, 'character': 0}, 'end': {'line': 372, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 422, 'character': 0}, 'end': {'line': 422, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 458, 'character': 0}, 'end': {'line': 458, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 471, 'character': 0}, 'end': {'line': 471, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 482, 'character': 0}, 'end': {'line': 482, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 486, 'character': 0}, 'end': {'line': 486, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 543, 'character': 0}, 'end': {'line': 543, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 566, 'character': 0}, 'end': {'line': 566, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 573, 'character': 0}, 'end': {'line': 573, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 591, 'character': 0}, 'end': {'line': 591, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D200', 'message': 'D200: One-line docstring should fit on one line with quotes (found 3)', 'severity': 2, 'range': {'start': {'line': 605, 'character': 0}, 'end': {'line': 605, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 605, 'character': 0}, 'end': {'line': 605, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 614, 'character': 0}, 'end': {'line': 614, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D205', 'message': 'D205: 1 blank line required between summary line and description (found 0)', 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D400', 'message': "D400: First line should end with a period (not 'x')", 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood; try rephrasing (found 'The')", 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 638, 'character': 0}, 'end': {'line': 638, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 643, 'character': 0}, 'end': {'line': 643, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 644, 'character': 0}, 'end': {'line': 644, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 647, 'character': 0}, 'end': {'line': 647, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 650, 'character': 0}, 'end': {'line': 650, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 653, 'character': 0}, 'end': {'line': 653, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 656, 'character': 0}, 'end': {'line': 656, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 660, 'character': 0}, 'end': {'line': 660, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 670, 'character': 0}, 'end': {'line': 670, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 673, 'character': 0}, 'end': {'line': 673, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 674, 'character': 0}, 'end': {'line': 674, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 690, 'character': 0}, 'end': {'line': 690, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 709, 'character': 0}, 'end': {'line': 709, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 729, 'character': 0}, 'end': {'line': 729, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 755, 'character': 0}, 'end': {'line': 755, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D202', 'message': 'D202: No blank lines allowed after function docstring (found 1)', 'severity': 2, 'range': {'start': {'line': 766, 'character': 0}, 'end': {'line': 766, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 766, 'character': 0}, 'end': {'line': 766, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood; try rephrasing (found 'Here')", 'severity': 2, 'range': {'start': {'line': 766, 'character': 0}, 'end': {'line': 766, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 788, 'character': 0}, 'end': {'line': 788, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 790, 'character': 0}, 'end': {'line': 790, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 807, 'character': 0}, 'end': {'line': 807, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 811, 'character': 0}, 'end': {'line': 811, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 818, 'character': 0}, 'end': {'line': 818, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 826, 'character': 0}, 'end': {'line': 826, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 828, 'character': 0}, 'end': {'line': 828, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 832, 'character': 0}, 'end': {'line': 832, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 847, 'character': 0}, 'end': {'line': 847, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 849, 'character': 0}, 'end': {'line': 849, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D200', 'message': 'D200: One-line docstring should fit on one line with quotes (found 3)', 'severity': 2, 'range': {'start': {'line': 855, 'character': 0}, 'end': {'line': 855, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 855, 'character': 0}, 'end': {'line': 855, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 900, 'character': 0}, 'end': {'line': 900, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 937, 'character': 0}, 'end': {'line': 937, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 951, 'character': 0}, 'end': {'line': 951, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 988, 'character': 0}, 'end': {'line': 988, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1164, 'character': 0}, 'end': {'line': 1164, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1172, 'character': 0}, 'end': {'line': 1172, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1181, 'character': 0}, 'end': {'line': 1181, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1194, 'character': 0}, 'end': {'line': 1194, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1204, 'character': 0}, 'end': {'line': 1204, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D202', 'message': 'D202: No blank lines allowed after function docstring (found 1)', 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D205', 'message': 'D205: 1 blank line required between summary line and description (found 0)', 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D400', 'message': "D400: First line should end with a period (not 't')", 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood ('Use', not 'Used')", 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1232, 'character': 0}, 'end': {'line': 1232, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1283, 'character': 0}, 'end': {'line': 1283, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1322, 'character': 0}, 'end': {'line': 1322, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1346, 'character': 0}, 'end': {'line': 1346, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1452, 'character': 0}, 'end': {'line': 1452, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1493, 'character': 0}, 'end': {'line': 1493, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1553, 'character': 0}, 'end': {'line': 1553, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1619, 'character': 0}, 'end': {'line': 1619, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1626, 'character': 0}, 'end': {'line': 1626, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1632, 'character': 0}, 'end': {'line': 1632, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1698, 'character': 0}, 'end': {'line': 1698, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1715, 'character': 0}, 'end': {'line': 1715, 'character': 32}}}], [{'source': 'mccabe', 'range': {'start': {'line': 989, 'character': 1}, 'end': {'line': 989, 'character': 4}}, 'message': 'Cyclomatic complexity too high: 29 (threshold 15)', 'severity': 2}, {'source': 'mccabe', 'range': {'start': {'line': 1233, 'character': 1}, 'end': {'line': 1233, 'character': 4}}, 'message': 'Cyclomatic complexity too high: 17 (threshold 15)', 'severity': 2}, {'source': 'mccabe', 'range': {'start': {'line': 1347, 'character': 1}, 'end': {'line': 1347, 'character': 4}}, 'message': 'Cyclomatic complexity too high: 24 (threshold 15)', 'severity': 2}]] [hook]

2018-02-16 16:45:58,037 DEBUG pyls.rpc_manager:notify:78 Notify textDocument/publishDiagnostics {'uri': 'file:///F:/SublimeText/Data/Packages/Amxmodx/Amxmodx.py', 'diagnostics': [{'source': 'pyflakes', 'range': {'start': {'line': 4, 'character': 0}, 'end': {'line': 4, 'character': 14}}, 'message': "'string' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 10, 'character': 0}, 'end': {'line': 10, 'character': 22}}, 'message': "'urllib.request' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 11, 'character': 0}, 'end': {'line': 11, 'character': 49}}, 'message': "'collections.defaultdict' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 11, 'character': 0}, 'end': {'line': 11, 'character': 49}}, 'message': "'collections.OrderedDict' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 12, 'character': 0}, 'end': {'line': 12, 'character': 20}}, 'message': "'from queue import *' used; unable to detect undefined names", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 13, 'character': 0}, 'end': {'line': 13, 'character': 36}}, 'message': "'threading.Thread' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 21, 'character': 0}, 'end': {'line': 21, 'character': 29}}, 'message': "'os.path.basename' imported but unused", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 820, 'character': 21}, 'end': {'line': 820, 'character': 27}}, 'message': "'node' may be undefined, or defined from star imports: queue", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1293, 'character': 3}, 'end': {'line': 1293, 'character': 20}}, 'message': "local variable 'count' is assigned to but never used", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1356, 'character': 2}, 'end': {'line': 1356, 'character': 10}}, 'message': "local variable 'pos' is assigned to but never used", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1692, 'character': 6}, 'end': {'line': 1692, 'character': 34}}, 'message': "'LOG_FILE_NAME' may be undefined, or defined from star imports: queue", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1693, 'character': 54}, 'end': {'line': 1693, 'character': 70}}, 'message': "'LOG_FILE_NAME' may be undefined, or defined from star imports: queue", 'severity': 2}, {'source': 'pyflakes', 'range': {'start': {'line': 1696, 'character': 31}, 'end': {'line': 1696, 'character': 102}}, 'message': "'LOG_FILE_NAME' may be undefined, or defined from star imports: queue", 'severity': 2}, {'source': 'pydocstyle', 'code': 'D100', 'message': 'D100: Missing docstring in public module', 'severity': 2, 'range': {'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 29, 'character': 0}, 'end': {'line': 29, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 38, 'character': 0}, 'end': {'line': 38, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 58, 'character': 0}, 'end': {'line': 58, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 64, 'character': 0}, 'end': {'line': 64, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 74, 'character': 0}, 'end': {'line': 74, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 83, 'character': 0}, 'end': {'line': 83, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 99, 'character': 0}, 'end': {'line': 99, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 108, 'character': 0}, 'end': {'line': 108, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 109, 'character': 0}, 'end': {'line': 109, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 113, 'character': 0}, 'end': {'line': 113, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 114, 'character': 0}, 'end': {'line': 114, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 118, 'character': 0}, 'end': {'line': 118, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 130, 'character': 0}, 'end': {'line': 130, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 134, 'character': 0}, 'end': {'line': 134, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 136, 'character': 0}, 'end': {'line': 136, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 156, 'character': 0}, 'end': {'line': 156, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 157, 'character': 0}, 'end': {'line': 157, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 178, 'character': 0}, 'end': {'line': 178, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 179, 'character': 0}, 'end': {'line': 179, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 184, 'character': 0}, 'end': {'line': 184, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 194, 'character': 0}, 'end': {'line': 194, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 212, 'character': 0}, 'end': {'line': 212, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 249, 'character': 0}, 'end': {'line': 249, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 310, 'character': 0}, 'end': {'line': 310, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 329, 'character': 0}, 'end': {'line': 329, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 348, 'character': 0}, 'end': {'line': 348, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 351, 'character': 0}, 'end': {'line': 351, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 354, 'character': 0}, 'end': {'line': 354, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 357, 'character': 0}, 'end': {'line': 357, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 362, 'character': 0}, 'end': {'line': 362, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D205', 'message': 'D205: 1 blank line required between summary line and description (found 0)', 'severity': 2, 'range': {'start': {'line': 372, 'character': 0}, 'end': {'line': 372, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 372, 'character': 0}, 'end': {'line': 372, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood; try rephrasing (found 'This')", 'severity': 2, 'range': {'start': {'line': 372, 'character': 0}, 'end': {'line': 372, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 422, 'character': 0}, 'end': {'line': 422, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 458, 'character': 0}, 'end': {'line': 458, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 471, 'character': 0}, 'end': {'line': 471, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 482, 'character': 0}, 'end': {'line': 482, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 486, 'character': 0}, 'end': {'line': 486, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 543, 'character': 0}, 'end': {'line': 543, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 566, 'character': 0}, 'end': {'line': 566, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 573, 'character': 0}, 'end': {'line': 573, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 591, 'character': 0}, 'end': {'line': 591, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D200', 'message': 'D200: One-line docstring should fit on one line with quotes (found 3)', 'severity': 2, 'range': {'start': {'line': 605, 'character': 0}, 'end': {'line': 605, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 605, 'character': 0}, 'end': {'line': 605, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 614, 'character': 0}, 'end': {'line': 614, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D205', 'message': 'D205: 1 blank line required between summary line and description (found 0)', 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D400', 'message': "D400: First line should end with a period (not 'x')", 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood; try rephrasing (found 'The')", 'severity': 2, 'range': {'start': {'line': 617, 'character': 0}, 'end': {'line': 617, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 638, 'character': 0}, 'end': {'line': 638, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 643, 'character': 0}, 'end': {'line': 643, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 644, 'character': 0}, 'end': {'line': 644, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 647, 'character': 0}, 'end': {'line': 647, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 650, 'character': 0}, 'end': {'line': 650, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 653, 'character': 0}, 'end': {'line': 653, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 656, 'character': 0}, 'end': {'line': 656, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 660, 'character': 0}, 'end': {'line': 660, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 670, 'character': 0}, 'end': {'line': 670, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 673, 'character': 0}, 'end': {'line': 673, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 674, 'character': 0}, 'end': {'line': 674, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 690, 'character': 0}, 'end': {'line': 690, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 709, 'character': 0}, 'end': {'line': 709, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 729, 'character': 0}, 'end': {'line': 729, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 755, 'character': 0}, 'end': {'line': 755, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D202', 'message': 'D202: No blank lines allowed after function docstring (found 1)', 'severity': 2, 'range': {'start': {'line': 766, 'character': 0}, 'end': {'line': 766, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 766, 'character': 0}, 'end': {'line': 766, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood; try rephrasing (found 'Here')", 'severity': 2, 'range': {'start': {'line': 766, 'character': 0}, 'end': {'line': 766, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 788, 'character': 0}, 'end': {'line': 788, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 790, 'character': 0}, 'end': {'line': 790, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 807, 'character': 0}, 'end': {'line': 807, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 811, 'character': 0}, 'end': {'line': 811, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 818, 'character': 0}, 'end': {'line': 818, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 826, 'character': 0}, 'end': {'line': 826, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 828, 'character': 0}, 'end': {'line': 828, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 832, 'character': 0}, 'end': {'line': 832, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D101', 'message': 'D101: Missing docstring in public class', 'severity': 2, 'range': {'start': {'line': 847, 'character': 0}, 'end': {'line': 847, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D107', 'message': 'D107: Missing docstring in __init__', 'severity': 2, 'range': {'start': {'line': 849, 'character': 0}, 'end': {'line': 849, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D200', 'message': 'D200: One-line docstring should fit on one line with quotes (found 3)', 'severity': 2, 'range': {'start': {'line': 855, 'character': 0}, 'end': {'line': 855, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 855, 'character': 0}, 'end': {'line': 855, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 900, 'character': 0}, 'end': {'line': 900, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 937, 'character': 0}, 'end': {'line': 937, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 951, 'character': 0}, 'end': {'line': 951, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 988, 'character': 0}, 'end': {'line': 988, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1164, 'character': 0}, 'end': {'line': 1164, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1172, 'character': 0}, 'end': {'line': 1172, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1181, 'character': 0}, 'end': {'line': 1181, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1194, 'character': 0}, 'end': {'line': 1194, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1204, 'character': 0}, 'end': {'line': 1204, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D202', 'message': 'D202: No blank lines allowed after function docstring (found 1)', 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D205', 'message': 'D205: 1 blank line required between summary line and description (found 0)', 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D208', 'message': 'D208: Docstring is over-indented', 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D400', 'message': "D400: First line should end with a period (not 't')", 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D401', 'message': "D401: First line should be in imperative mood ('Use', not 'Used')", 'severity': 2, 'range': {'start': {'line': 1217, 'character': 0}, 'end': {'line': 1217, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1232, 'character': 0}, 'end': {'line': 1232, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1283, 'character': 0}, 'end': {'line': 1283, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1322, 'character': 0}, 'end': {'line': 1322, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1346, 'character': 0}, 'end': {'line': 1346, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1452, 'character': 0}, 'end': {'line': 1452, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1493, 'character': 0}, 'end': {'line': 1493, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D102', 'message': 'D102: Missing docstring in public method', 'severity': 2, 'range': {'start': {'line': 1553, 'character': 0}, 'end': {'line': 1553, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1619, 'character': 0}, 'end': {'line': 1619, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1626, 'character': 0}, 'end': {'line': 1626, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1632, 'character': 0}, 'end': {'line': 1632, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1698, 'character': 0}, 'end': {'line': 1698, 'character': 32}}}, {'source': 'pydocstyle', 'code': 'D103', 'message': 'D103: Missing docstring in public function', 'severity': 2, 'range': {'start': {'line': 1715, 'character': 0}, 'end': {'line': 1715, 'character': 32}}}, {'source': 'mccabe', 'range': {'start': {'line': 989, 'character': 1}, 'end': {'line': 989, 'character': 4}}, 'message': 'Cyclomatic complexity too high: 29 (threshold 15)', 'severity': 2}, {'source': 'mccabe', 'range': {'start': {'line': 1233, 'character': 1}, 'end': {'line': 1233, 'character': 4}}, 'message': 'Cyclomatic complexity too high: 17 (threshold 15)', 'severity': 2}, {'source': 'mccabe', 'range': {'start': {'line': 1347, 'character': 1}, 'end': {'line': 1347, 'character': 4}}, 'message': 'Cyclomatic complexity too high: 24 (threshold 15)', 'severity': 2}]}
2018-02-16 16:45:58,054 DEBUG pyls.json_rpc_server:write_message:82 Sending <jsonrpc.jsonrpc2.JSONRPC20Request object at 0x000001D744922E48>
[LSP] 16:45:58:071.940899 <--  textDocument/publishDiagnostics
[LSP] 16:45:58:073.944092 Unhandled request textDocument/publishDiagnostics



Even running directly from you branch it does this:

[LSP] 19:12:20:225.505114  --> textDocument/didOpen
[LSP] 19:12:20:229.509115 Error handling server payload
Traceback (most recent call last):
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 322, in receive_payload
    self.response_handler(payload)
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 335, in response_handler
    handler_id = int(response.get("id"))  # dotty sends strings back :(
TypeError: int() argument must be a string or a number, not 'NoneType'
[LSP] 19:12:22:111.993074 <--  textDocument/publishDiagnostics
[LSP] 19:12:22:112.494946 Unhandled request textDocument/publishDiagnostics

@tomv564
Copy link
Contributor

tomv564 commented Feb 17, 2018

LSP does not use batch JSON-RPC requests and I have no immediate plans of implementing them. I think offering async request handling (at least for all the linters) could make a good improvement in responsiveness for some user's configurations. Great initiative!

@evandrocoan
Copy link
Contributor

@ferozco, even after merging your fix, the problem still happening:

00:07:41:588.052034 6.38e-03 - LSP.plugin.core - Error handling server payload
Traceback (most recent call last):
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 327, in receive_payload
    self.response_handler(payload)
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 340, in response_handler
    handler_id = int(response.get("id"))  # dotty sends strings back :(
TypeError: int() argument must be a string or a number, not 'NoneType'

@ferozco
Copy link
Contributor Author

ferozco commented Feb 18, 2018

@evandrocoan I wasn't able to find a location where we would be sending responses with a null id. it would be helpful if you could either give me some repro steps or add some debug logic to print out what message is causing this error to occur.

@evandrocoan
Copy link
Contributor

evandrocoan commented Feb 19, 2018

@ferozco, I added this:

File: Data/Packages/LSP/plugin/core/rpc.py
339:     def response_handler(self, response):
340:         print( "response:", response )
341:         handler_id = int(response.get("id"))  # dotty sends strings back :(

And got:

response: {'jsonrpc': '2.0', 'result': {'capabilities': {'signatureHelpProvider': {'triggerCharacters': ['(', ',']}, 'documentRangeFormattingProvider': True, 'experimental': {}, 'referencesProvider': True, 'textDocumentSync': 2, 'definitionProvider': True, 'hoverProvider': True, 'documentSymbolProvider': True, 'renameProvider': True, 'codeLensProvider': {'resolveProvider': False}, 'executeCommandProvider': {'commands': []}, 'codeActionProvider': True, 'completionProvider': {'triggerCharacters': ['.'], 'resolveProvider': False}, 'documentFormattingProvider': True}}, 'id': 1}
response: {'jsonrpc': '2.0', 'id': None, 'error': {'message': 'Method not found', 'code': -32601}}
indexing [job 4]: no files were indexed out of the 12 queued, abandoning crawl
response: {'jsonrpc': '2.0', 'result': {'contents': ''}, 'id': 2}

I would suggest to change Method not found to Method {method_name} not found.

@evandrocoan
Copy link
Contributor

@ferozco, after merging these changes, the server is crashing some times. This the last stack track logged:

04:44:16:848.219395 7.50e-01 - pyls.plugins.pydocstyle_lint.pyls_lint:46 DEBUG - Got pydocstyle errors: []
04:44:16:853.725433 7.23e-01 - pyls.config.source.read_config_from_files:52 DEBUG - Using cached configuration for ()
04:44:16:857.728958 5.84e-02 - pyls.config.config.settings:87 DEBUG - Got user config from PyCodeStyleConfig: {}
04:44:16:860.731602 2.99e-03 - pyls.config.config.settings:89 DEBUG - With user configuration: {}
04:44:16:863.734961 2.93e-03 - pyls.config.config.settings:92 DEBUG - With plugin configuration: {'plugins': {'rope_completion': {'enabled': False}, 'pydocstyle': {'enabled': False}}}
04:44:16:866.738796 2.94e-03 - pyls.config.config.settings:95 DEBUG - With lsp configuration: {'plugins': {'rope_completion': {'enabled': False}, 'rope': {'create_folder': False}, 'pydocstyle': {'enabled': True, 'ignore': ['D202', 'D208']}, 'pycodestyle': {'enabled': False}}}
04:44:16:871.741772 1.81e-02 - pyls.config.source.read_config_from_files:52 DEBUG - Using cached configuration for ()
04:44:16:875.746965 8.84e-03 - pyls.config.config.settings:100 DEBUG - Got project config from PyCodeStyleConfig: {}
04:44:16:879.250526 3.49e-03 - pyls.config.config.settings:102 DEBUG - With project configuration: {'plugins': {'rope_completion': {'enabled': False}, 'rope': {'create_folder': False}, 'pydocstyle': {'enabled': True, 'ignore': ['D202', 'D208']}, 'pycodestyle': {'enabled': False}}}
04:44:16:883.253098 7.39e-01 - pyls.plugins.mccabe_lint.pyls_lint:16 DEBUG - Running mccabe lint with threshold: 15
04:44:16:894.263744 1.54e-02 - pyls.config.config.processmessage:137 DEBUG -   finish pyls_lint --> [[{'source': 'pyflakes', 'range': {'start': {'line': 62, 'character': 8}, 'end': {'line': 62, 'character': 49}}, 'message': 'unexpected indent', 'severity': 1}], []] [hook]

04:44:16:897.767067 7.40e-01 - pyls.rpc_manager.notify:78 DEBUG - Notify textDocument/publishDiagnostics {'uri': 'file:///F:/SublimeText/Data/Packages/PlantUmlDiagrams/diagram/__init__.py', 'diagnostics': [{'source': 'pyflakes', 'range': {'start': {'line': 62, 'character': 8}, 'end': {'line': 62, 'character': 49}}, 'message': 'unexpected indent', 'severity': 1}]}
04:44:16:902.271509 7.40e-01 - pyls.json_rpc_server.write_message:82 DEBUG - Sending <jsonrpc.jsonrpc2.JSONRPC20Request object at 0x000001F30975B780>
04:44:16:907.274961 5.69e-01 - LSP.plugin.core.notification_handler:384 - <--  textDocument/publishDiagnostics
04:44:16:907.776117 5.70e-01 - LSP.plugin.core.log_stream:84 - server: Traceback (most recent call last):
04:44:16:909.277916 1.61e-03 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\base\pyobjectsdef.py", line 189, in _init_source
04:44:16:910.279036 9.93e-04 - LSP.plugin.core.log_stream:84 - server: ast_node = ast.parse(source_bytes, filename=filename)
04:44:16:911.279917 8.60e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\base\ast.py", line 21, in parse
04:44:16:911.781073 6.60e-04 - LSP.plugin.core.log_stream:84 - server: return compile(source, filename, 'exec', _ast.PyCF_ONLY_AST)
04:44:16:912.281036 6.19e-04 - LSP.plugin.core.log_stream:84 - server: File "Packages/PlantUmlDiagrams/diagram/__init__.py", line 63
04:44:16:912.781954 5.94e-04 - LSP.plugin.core.log_stream:84 - server: pass
04:44:16:913.783073 5.76e-04 - LSP.plugin.core.log_stream:84 - server: ^
04:44:16:914.283037 5.82e-04 - LSP.plugin.core.log_stream:84 - server: IndentationError: unexpected indent
04:44:16:914.783955 5.80e-04 - LSP.plugin.core.log_stream:84 - server: 
04:44:16:915.283918 5.74e-04 - LSP.plugin.core.log_stream:84 - server: During handling of the above exception, another exception occurred:
04:44:16:915.783882 5.69e-04 - LSP.plugin.core.log_stream:84 - server: 
04:44:16:916.285038 5.71e-04 - LSP.plugin.core.log_stream:84 - server: Traceback (most recent call last):
04:44:16:917.285919 5.82e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\contrib\fixsyntax.py", line 32, in get_pymodule
04:44:16:917.785883 5.72e-04 - LSP.plugin.core.log_stream:84 - server: force_errors=True)
04:44:16:918.286085 6.50e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\base\libutils.py", line 94, in get_string_module
04:44:16:918.786049 5.88e-04 - LSP.plugin.core.log_stream:84 - server: force_errors=force_errors)
04:44:16:919.286966 5.47e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\base\pyobjectsdef.py", line 162, in __init__
04:44:16:920.288086 7.25e-04 - LSP.plugin.core.log_stream:84 - server: source, node = self._init_source(pycore, source, resource)
04:44:16:920.789003 5.45e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\base\pyobjectsdef.py", line 191, in _init_source
04:44:16:921.288967 5.42e-04 - LSP.plugin.core.log_stream:84 - server: raise exceptions.ModuleSyntaxError(filename, e.lineno, e.msg)
04:44:16:921.789885 5.36e-04 - LSP.plugin.core.log_stream:84 - server: rope.base.exceptions.ModuleSyntaxError: Syntax error in file <Packages/PlantUmlDiagrams/diagram/__init__.py> line <63>: unexpected indent
04:44:16:922.290087 5.50e-04 - LSP.plugin.core.log_stream:84 - server: 
04:44:16:922.790051 5.31e-04 - LSP.plugin.core.log_stream:84 - server: During handling of the above exception, another exception occurred:
04:44:16:923.290014 5.31e-04 - LSP.plugin.core.log_stream:84 - server: 
04:44:16:923.791885 6.22e-04 - LSP.plugin.core.log_stream:84 - server: Traceback (most recent call last):
04:44:16:925.295115 1.06e-03 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\Scripts\pyls-script.py", line 11, in <module>
04:44:16:925.792933 7.99e-04 - LSP.plugin.core.log_stream:84 - server: load_entry_point('python-language-server', 'console_scripts', 'pyls')()
04:44:16:926.294088 5.66e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\__main__.py", line 54, in main
04:44:16:926.795006 5.88e-04 - LSP.plugin.core.log_stream:84 - server: start_io_lang_server(stdin, stdout, PythonLanguageServer)
04:44:16:927.794933 5.65e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\python_ls.py", line 59, in start_io_lang_server
04:44:16:928.296089 5.54e-04 - LSP.plugin.core.log_stream:84 - server: server.start()
04:44:16:928.796053 5.81e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\python_ls.py", line 85, in start
04:44:16:929.296970 6.03e-04 - LSP.plugin.core.log_stream:84 - server: self.rpc_manager.start()
04:44:16:929.796934 5.74e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\rpc_manager.py", line 42, in start
04:44:16:930.296898 5.72e-04 - LSP.plugin.core.log_stream:84 - server: self.consume_requests()
04:44:16:930.798054 5.93e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\rpc_manager.py", line 103, in consume_requests
04:44:16:931.798935 6.04e-04 - LSP.plugin.core.log_stream:84 - server: self._handle_request(message)
04:44:16:932.298899 5.85e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\rpc_manager.py", line 120, in _handle_request
04:44:16:932.800055 5.83e-04 - LSP.plugin.core.log_stream:84 - server: maybe_handler = self._message_handler(request.method, params)
04:44:16:933.300018 5.79e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\python_ls.py", line 103, in handle_request
04:44:16:933.800936 5.86e-04 - LSP.plugin.core.log_stream:84 - server: return getattr(self, method_call)(**params)
04:44:16:934.802055 5.90e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\python_ls.py", line 248, in m_text_document__completion
04:44:16:935.302019 5.88e-04 - LSP.plugin.core.log_stream:84 - server: return self.completions(textDocument['uri'], position)
04:44:16:935.802937 6.03e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\python_ls.py", line 179, in completions
04:44:16:936.302900 5.69e-04 - LSP.plugin.core.log_stream:84 - server: completions = self._hook('pyls_completions', doc_uri, position=position)
04:44:16:936.804056 5.48e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\python_ls.py", line 116, in _hook
04:44:16:937.304020 5.69e-04 - LSP.plugin.core.log_stream:84 - server: return hook_handlers(config=self.config, workspace=self.workspace, document=doc, **kwargs)
04:44:16:937.803984 5.92e-04 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\__init__.py", line 617, in __call__
04:44:16:938.805103 5.94e-04 - LSP.plugin.core.log_stream:84 - server: return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
04:44:16:939.306974 5.91e-04 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\__init__.py", line 222, in _hookexec
04:44:16:939.805984 5.85e-04 - LSP.plugin.core.log_stream:84 - server: return self._inner_hookexec(hook, methods, kwargs)
04:44:16:944.812059 4.95e-03 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\__init__.py", line 182, in __call__
04:44:16:945.811987 9.99e-04 - LSP.plugin.core.log_stream:84 - server: return outcome.get_result()
04:44:16:946.813107 1.31e-03 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\callers.py", line 76, in get_result
04:44:16:947.813988 5.99e-04 - LSP.plugin.core.log_stream:84 - server: raise ex[1].with_traceback(ex[2])
04:44:16:948.313951 5.66e-04 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\callers.py", line 48, in from_call
04:44:16:948.815107 5.64e-04 - LSP.plugin.core.log_stream:84 - server: result = func()
04:44:16:949.315071 5.59e-04 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\__init__.py", line 180, in <lambda>
04:44:16:949.815989 5.42e-04 - LSP.plugin.core.log_stream:84 - server: outcome = _Result.from_call(lambda: self.oldcall(hook, hook_impls, kwargs))
04:44:16:950.314999 5.38e-04 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\__init__.py", line 216, in <lambda>
04:44:16:951.318026 8.80e-04 - LSP.plugin.core.log_stream:84 - server: firstresult=hook.spec_opts.get('firstresult'),
04:44:16:951.817989 6.56e-04 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\callers.py", line 201, in _multicall
04:44:16:952.819109 1.06e-03 - LSP.plugin.core.log_stream:84 - server: return outcome.get_result()
04:44:16:954.320908 1.24e-03 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\callers.py", line 76, in get_result
04:44:16:955.322027 9.94e-04 - LSP.plugin.core.log_stream:84 - server: raise ex[1].with_traceback(ex[2])
04:44:16:955.821991 7.11e-04 - LSP.plugin.core.log_stream:84 - server: File "F:\Python\lib\site-packages\pluggy\callers.py", line 180, in _multicall
04:44:16:956.321955 5.98e-04 - LSP.plugin.core.log_stream:84 - server: res = hook_impl.function(*args)
04:44:16:957.323074 5.61e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-language-server\pyls\plugins\rope_completion.py", line 31, in pyls_completions
04:44:16:957.823038 5.75e-04 - LSP.plugin.core.log_stream:84 - server: offset, document._rope, maxfixes=3)
04:44:16:958.323956 5.38e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\contrib\codeassist.py", line 40, in code_assist
04:44:16:958.823919 5.50e-04 - LSP.plugin.core.log_stream:84 - server: return assist()
04:44:16:959.325075 5.58e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\contrib\codeassist.py", line 382, in __call__
04:44:16:959.825039 5.44e-04 - LSP.plugin.core.log_stream:84 - server: completions = list(self._code_completions().values())
04:44:16:960.325003 5.37e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\contrib\codeassist.py", line 451, in _code_completions
04:44:16:960.825920 5.61e-04 - LSP.plugin.core.log_stream:84 - server: pymodule = fixer.get_pymodule()
04:44:16:961.827040 6.30e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\base\utils\__init__.py", line 12, in _wrapper
04:44:16:962.327003 7.35e-04 - LSP.plugin.core.log_stream:84 - server: setattr(self, name, func(self, *args, **kwds))
04:44:16:962.827921 5.52e-04 - LSP.plugin.core.log_stream:84 - server: File "d:\user\dropbox\softwareversioning\python-rope\rope\contrib\fixsyntax.py", line 43, in get_pymodule
04:44:16:963.327885 5.70e-04 - LSP.plugin.core.log_stream:84 - server: 'Failed to fix error: {0}'.format(msg))
04:44:16:963.829041 5.48e-04 - LSP.plugin.core.log_stream:84 - server: rope.base.exceptions.ModuleSyntaxError: Syntax error in file <Packages/PlantUmlDiagrams/diagram/__init__.py> line <63>: Failed to fix error: Packages/PlantUmlDiagrams/diagram/__init__.py:63 unexpected indent
04:44:17:020.381927 5.63e-02 - LSP.plugin.core.send_notification:276 -  --> textDocument/didChange
04:44:17:755.078077 7.35e-01 - LSP.plugin.core.send:235 - Failure writing to stdout
Traceback (most recent call last):
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 233, in send
    self.process.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe
LSP stderr process ended.Exception in thread Thread-4:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 204, in read_stdout
    running = self.process.poll() is None
AttributeError: 'NoneType' object has no attribute 'poll'


@ferozco
Copy link
Contributor Author

ferozco commented Feb 19, 2018

@evandrocoan I think i've found and resolved the issue around the null Ids.

Since none of the handlers have been converted to use the new async functionality, it would be unexpected if my change caused this exception. It appears as if there is an unhandled exception coming from the rope plugin.

If people are ok, i'd like to move forward and have this merged in and i'll handle any other issues as they come up

@lgeiger
Copy link
Contributor

lgeiger commented Feb 19, 2018

@ferozco Thanks for the work 🎉
I quickly used this branch with the Atom plugin and it works great so far.

Copy link
Contributor

@gatesn gatesn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of little nits, but overall looks awesome.

from jsonrpc.jsonrpc2 import JSONRPC20Response, JSONRPC20BatchRequest, JSONRPC20BatchResponse
from jsonrpc.jsonrpc import JSONRPCRequest
from jsonrpc.exceptions import (
JSONRPCInvalidRequestException,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for multiline import

from jsonrpc.exceptions import (
JSONRPCInvalidRequestException,
)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One blank line

# we do not send out batch requests so no need to support batch responses
messages = [JSONRPC20Response(**message_blob)]
except (KeyError, ValueError):
log.error("Could not parse message %s", request_str)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change to log.exception so we don't lose the stack trace.

def get_messages(self):
"""Generator that produces well structured JSON RPC message.
Returns:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Yields: not Returns:

from .json_rpc_server import JSONRPCServer
from .rpc_manager import JSONRPCManager
from .workspace import Workspace
from .rpc_manager import MissingMethodException
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you collapse the two imports from .rpc_manager into one?

output = _make_response(request, error=e.error._data)
except Exception as e: # pylint: disable=broad-except
# TODO(forozco): add more descriptive error
log.error('endpoint exception %s %s %s', e.__class__.__name__, e.args, str(e))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again log.exception here. Perhaps "Asynchronous dispatched method exception`

try:
request = self._sent_requests[response._id]
except KeyError:
log.error('Received unexpected response %s', response.data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually prefer an explicit check for these sorts of things if response._id not in self._sent_requests. Particularly in this case where the try/else block makes up the bulk of the function.

PRELOADED_MODULES = get_preferred_submodules()

def __init__(self, root_uri, lang_server=None):
def __init__(self, root_uri, rpc_manager=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make rpc_manager required

except JSONRPCDispatchException as e:
assert e.error.code == JSONRPCMethodNotFound.CODE
else:
assert False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a message here? e.g. assert False, "reason for failure"

tox.ini Outdated
pycodestyle pyls
pyflakes pyls
pylint pyls test
pycodestyle pyls test --exclude=test/plugins/.ropeproject,test/.ropeproject
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add these excludes to the [pycodestyle] block above?

output = _make_response(request, error=e.error._data)
except Exception as e: # pylint: disable=broad-except
log.error('endpoint exception %s %s %s', e.__class__.__name__, e.args, str(e))
log.exception('synchronous method handler exception')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we log the original request here like:

log.exception('synchronous method handler exception for request %s', request)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure! in a follow up

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gatesn gatesn merged commit 8b705bc into develop Feb 20, 2018
@gatesn gatesn deleted the fo/futures branch February 20, 2018 11:57
except Exception as e: # pylint: disable=broad-except
# TODO(forozco): add more descriptive error
log.error('endpoint exception %s %s %s', e.__class__.__name__, e.args, str(e))
log.exception('asynchronous method handler exception')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log.exception('asynchronous method handler exception for request %s, handler %s '
	'and completed_future %s', request, handler, completed_future)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants