Hi,
Today I have created a new virtual environment with Anaconda on a Windows 11 PC, in which I installed Jupyterlab 3.6.5 together with python-lsp-server. While jupyterlab is running, an error appears in the log all of the time. I copied the relevant excerpt from the log below, which shows the exception that is thrown:
Error: expected initialized notification, got: Request(Request { id: RequestId(I32(0)), method: "initialize", params: Object {"capabilities": Object {"textDocument": Object {"completion": Object {"completionItem": Object {"commitCharactersSupport": Bool(true), "deprecatedSupport": Bool(true), "documentationFormat": Array [String("markdown"), String("plaintext")], "preselectSupport": Bool(false), "snippetSupport": Bool(false), "tagSupport": Object {"valueSet": Array [Number(1)]}}, "contextSupport": Bool(false), "dynamicRegistration": Bool(true)}, "declaration": Object {"dynamicRegistration": Bool(true), "linkSupport": Bool(true)}, "definition": Object {"dynamicRegistration": Bool(true), "linkSupport": Bool(true)}, "hover": Object {"contentFormat": Array [String("markdown"), String("plaintext")], "dynamicRegistration": Bool(true)}, "implementation": Object {"dynamicRegistration": Bool(true), "linkSupport": Bool(true)}, "publishDiagnostics": Object {"tagSupport": Object {"valueSet": Array [Number(2), Number(1)]}}, "signatureHelp": Object {"dynamicRegistration": Bool(true), "signatureInformation": Object {"documentationFormat": Array [String("markdown"), String("plaintext")]}}, "synchronization": Object {"didSave": Bool(true), "dynamicRegistration": Bool(true), "willSave": Bool(false), "willSaveWaitUntil": Bool(false)}, "typeDefinition": Object {"dynamicRegistration": Bool(true), "linkSupport": Bool(true)}}, "workspace": Object {"didChangeConfiguration": Object {"dynamicRegistration": Bool(true)}}}, "initializationOptions": Null, "processId": Null, "rootUri": String("file:///c:/Users/JawDrin/jupyterwork"), "workspaceFolders": Null} })
[E 2023-08-20 16:02:02.823 ServerApp] <LspStdIoWriter(parent=<LanguageServerSession(language_server=texlab, argv=['D:\\anaconda3\\envs\\py310\\Scripts\\texlab.EXE'])>)> couldn't write message: Content-Length: 52
{"jsonrpc":"2.0","method":"initialized","params":{}}
Traceback (most recent call last):
File "D:\anaconda3\envs\py310\lib\site-packages\jupyter_lsp\stdio.py", line 193, in write
await convert_yielded(self._write_one(response.encode("utf-8")))
File "D:\anaconda3\envs\py310\lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\anaconda3\envs\py310\lib\site-packages\jupyter_lsp\stdio.py", line 201, in _write_one
self.stream.write(message)
OSError: [Errno 22] Invalid argument
[E 2023-08-20 16:13:16.536 ServerApp] <LspStdIoWriter(parent=<LanguageServerSession(language_server=texlab, argv=['D:\\anaconda3\\envs\\py310\\Scripts\\texlab.EXE'])>)> couldn't write message: Content-Length: 215
{"jsonrpc":"2.0","id":9,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///c:/Users/JawDrin/jupyterwork/Trytry/continuous_network/untitled.tex"},"position":{"line":3,"character":14}}}
Traceback (most recent call last):
File "D:\anaconda3\envs\py310\lib\site-packages\jupyter_lsp\stdio.py", line 193, in write
await convert_yielded(self._write_one(response.encode("utf-8")))
File "D:\anaconda3\envs\py310\lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\anaconda3\envs\py310\lib\site-packages\jupyter_lsp\stdio.py", line 201, in _write_one
self.stream.write(message)
OSError: [Errno 22] Invalid argument
[E 2023-08-20 16:13:16.537 ServerApp] <LspStdIoWriter(parent=<LanguageServerSession(language_server=texlab, argv=['D:\\anaconda3\\envs\\py310\\Scripts\\texlab.EXE'])>)> couldn't write message: Content-Length: 215
{"jsonrpc":"2.0","id":9,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///c:/Users/JawDrin/jupyterwork/Trytry/continuous_network/untitled.tex"},"position":{"line":3,"character":14}}}
Traceback (most recent call last):
File "D:\anaconda3\envs\py310\lib\site-packages\jupyter_lsp\stdio.py", line 193, in write
await convert_yielded(self._write_one(response.encode("utf-8")))
File "D:\anaconda3\envs\py310\lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\anaconda3\envs\py310\lib\site-packages\jupyter_lsp\stdio.py", line 201, in _write_one
self.stream.write(message)
OSError: [Errno 22] Invalid argument
So I hope that someone knows how this error can be fixed. Could you give me some advises