Skip to content

Broken pipe error and test drive report #274

Open
@ivanov

Description

@ivanov

Hi there,

I tried out JupyterLab-LSP and wanted to share my experience. You can find it here:
https://github.com/ivanov/jlsp-test-drive/blob/master/README.md

The short version is many things did not work for me, and most of them resulted in a notebook server console log error message that looked something like this:

Bad message (TypeError('not all arguments converted during string formatting')): {'name': 'LabApp', 'msg': "s couldn't write message: %s", 'args': (<LspStdIoWriter(parent=<LanguageServerSession(language_server=pyls, argv=['/home/pi/.virtualenvs/jlsp/bin/pyls'])>)>, 'Content-Length: 218\r\n\r\n{"jsonrpc":"2.0","id":276,"method":"textDocument/references","params":{"context":{"includeDeclaration":true},"textDocument":{"uri":"file:///home/pi/code/pid/wpid/lsp/highlight.py"},"position":{"line":1,"character":2}}}'), 'levelname': 'ERROR', 'levelno': 40, 'pathname': '/home/pi/.virtualenvs/jlsp/lib/python3.8/site-packages/jupyter_lsp/stdio.py', 'filename': 'stdio.py', 'module': 'stdio', 'exc_info': (<class 'BrokenPipeError'>, BrokenPipeError(32, 'Broken pipe'), <traceback object at 0x7f3658674240>), 'exc_text': None, 'stack_info': None, 'lineno': 163, 'funcName': 'write', 'created': 1590606815.4147756, 'msecs': 414.7756099700928, 'relativeCreated': 1358175.628900528, 'thread': 139871523256128, 'threadName': 'MainThread', 'processName': 'MainProcess', 'process': 84827}
    Traceback (most recent call last):
      File "/home/pi/.virtualenvs/jlsp/lib/python3.8/site-packages/jupyter_lsp/stdio.py", line 161, in write
        await convert_yielded(self._write_one(response.encode("utf-8")))
      File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/home/pi/.virtualenvs/jlsp/lib/python3.8/site-packages/jupyter_lsp/stdio.py", line 169, in _write_one
        self.stream.write(message)
    BrokenPipeError: [Errno 32] Broken pipe

I used Python 3.8.3 on Debian unstable with

jupyter-lsp==0.8.0
jupyterlab==2.0.2
jupyterlab-server==1.0.7
python-language-server==0.31.10

The output of jupyter labextension list

JupyterLab v2.0.2
Known labextensions:
   app dir: /home/pi/.virtualenvs/jlsp/share/jupyter/lab
        @krassowski/jupyterlab-lsp v1.0.0  enabled  OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions