python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.75k stars 187 forks source link

Method Not Found: textDocument/diagnostic #542

Open luozhouyang opened 3 months ago

luozhouyang commented 3 months ago

Does python-lsp-server support textDocument/diagnostic method? When I request a textDocument/diagnostic for a document, the server response error:

KeyError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniconda/base/envs/debug-agent/lib/python3.10/site-packages/pylsp_jsonrpc/endpoint.py", line 117, in consume
    self._handle_request(message['id'], message['method'], message.get('params'))
  File "/opt/homebrew/Caskroom/miniconda/base/envs/debug-agent/lib/python3.10/site-packages/pylsp_jsonrpc/endpoint.py", line 195, in _handle_request
    raise JsonRpcMethodNotFound.of(method) from e
pylsp_jsonrpc.exceptions.JsonRpcMethodNotFound: Method Not Found: textDocument/diagnostic