Giter Site home page Giter Site logo

Issues with `pyls` about helix HOT 8 CLOSED

tuxiqae avatar tuxiqae commented on May 4, 2024
Issues with `pyls`

from helix.

Comments (8)

archseer avatar archseer commented on May 4, 2024

It looks like you have pyls installed and it's failing to communicate with it (can't find the Content-Length header).

Do you have a sample project I could test on?

from helix.

tuxiqae avatar tuxiqae commented on May 4, 2024

You may try testing on my WIP project https://github.com/tuxiqae/Friecipe

Or any other Python project TBH

from helix.

tuxiqae avatar tuxiqae commented on May 4, 2024

P.S. Seems like pyls really isn't working

 ❯ pyls
Traceback (most recent call last):
  File "/home/user/.local/bin/pyls", line 5, in <module>
    from pyls.__main__ import main
ModuleNotFoundError: No module named 'pyls'

from helix.

IceDragon200 avatar IceDragon200 commented on May 4, 2024

So this is a language server integration issue, I was able to navigate your project without issue, but I don't have pyls at all, so that may have helped.

I think the editor should probably show an error, saying it couldn't start/communicate with the language server and just disables it to prevent crashing unexpectedly

from helix.

archseer avatar archseer commented on May 4, 2024

Reopening because I'd still like to solve the underlying cause, but at least it shouldn't panic anymore

from helix.

malte-v avatar malte-v commented on May 4, 2024

I don't think this is specific to pyls. I frequently get random crashes with rust-analyzer, too.

from helix.

malte-v avatar malte-v commented on May 4, 2024

Some debug logging reveals that language servers may sometimes send ill-formed messages:

2021-06-18T19:11:50.957 helix_lsp::transport [INFO] header: Content-Length: 111
2021-06-18T19:11:50.957 helix_lsp::transport [INFO] header: 
2021-06-18T19:11:50.957 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":142,"method":"window/workDoneProgress/create","params":{"token":"rustAnalyzer/Indexing"}}
2021-06-18T19:11:50.957 helix_lsp::transport [INFO] header: Content-Length: 141
2021-06-18T19:11:50.957 helix_lsp::transport [INFO] header: 
2021-06-18T19:11:50.957 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"begin","title":"Indexing","percentage":0}}}
2021-06-18T19:11:50.961 helix_lsp::transport [INFO] header: Content-Length: 157
2021-06-18T19:11:50.961 helix_lsp::transport [INFO] header: 
2021-06-18T19:11:50.961 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","result":null,"id":142}
2021-06-18T19:11:50.961 helix_lsp::transport [INFO] header: {"jsonrpc":"2.0","method":"$/progress","params":{"token":"rustAnalyzer/Indexing","value":{"kind":"report","message":"40/523 (tokio_macros)","percentage":7}}}Content-Length: 156
2021-06-18T19:11:50.961 helix_lsp::transport [INFO] header: 
<crash happened here>

Notice that the last message does not look right at all.

from helix.

malte-v avatar malte-v commented on May 4, 2024

#306 should fix this issue. (I think the pyls error is also caused by the content_length unwrap.)

from helix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.