Skip to content

Unexpected response from Language Server #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
masterSunflowers opened this issue Jan 14, 2025 · 6 comments
Open

Unexpected response from Language Server #44

masterSunflowers opened this issue Jan 14, 2025 · 6 comments

Comments

@masterSunflowers
Copy link

Hi, thank for great repository. I currently encounter this problem:
Unexpected response from Language Server: None. Here is the log from multilspy: bash INFO:multilspy:{"time":"2025-01-14 11:43:11","level":"INFO","caller_file":"C:\\Users\\thieulvd\\AppData\\Local\\anaconda3\\envs\\continue\\Lib\\site-packages\\multilspy\\language_servers\\jedi_language_server\\jedi_server.py","caller_name":"start_server","caller_line":99,"message":"Starting jedi-language-server server process"} INFO:multilspy:{"time":"2025-01-14 11:43:11","level":"INFO","caller_file":"C:\\Users\\thieulvd\\AppData\\Local\\anaconda3\\envs\\continue\\Lib\\site-packages\\multilspy\\language_servers\\jedi_language_server\\jedi_server.py","caller_name":"start_server","caller_line":103,"message":"Sending initialize request from LSP client to LSP server and awaiting response"}

I don't know where to start debugging.

@LakshyAAAgrawal
Copy link
Collaborator

Dear @masterSunflowers , can you please run the unit tests for multilspy as shown in README and report the results?

@masterSunflowers
Copy link
Author

Yes, of course. But now, I have no access to the computer that I encountered the problem. I will test and report soon (about a week later)

@LakshyAAAgrawal
Copy link
Collaborator

Hi @masterSunflowers, did you have a chance to look into the issue? I would be glad to help in any way I can!

@pracheer
Copy link

@LakshyAAAgrawal Receiving similar error. Though not always. In my quick test: I'm getting the error 8 times out of 36 when trying to resolve this file: https://github.com/aws-samples/aws-serverless-airline-booking/blob/archive/src/backend/booking/src/notify-booking/notify.py

  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/tasks.py", line 277, in __step
    result = coro.send(None)
             ^^^^^^^^^^^^^^^
  File "/Users/pracheer/GitRepos/backend-server/.venv/lib/python3.11/site-packages/multilspy/language_server.py", line 435, in request_definition
    assert False, f"Unexpected response from Language Server: {response}"
           ^^^^^
AssertionError: Unexpected response from Language Server: None

Resolutions that are returning this error (everything is 0 indexed):
• Line 4, Column 34
• Line 4, Column 42
• Line 4, Column 51
• Line 5, Column 42
• Line 8, Column 28
• Line 10, Column 9
• Line 11, Column 9
• Line 12, Column 10

Resolutions which were successful:
• Line 0, Column 7
• Line 1, Column 7
• Line 3, Column 7
• Line 6, Column 32
• Line 14, Column 10
• Line 15, Column 6
• Line 16, Column 20
• Line 63, Column 8
• Line 73, Column 14
• Line 75, Column 20
• Line 82, Column 8
• Line 83, Column 8
• Line 87, Column 8
• Line 88, Column 14
• Line 125, Column 18
• Line 126, Column 14
• Line 127, Column 12
• Line 128, Column 24
• Line 131, Column 8
• Line 132, Column 8
• Line 133, Column 14
• Line 137, Column 14
• Line 139, Column 8
• Line 140, Column 8
• Line 141, Column 8
• Line 146, Column 8
• Line 147, Column 8
• Line 148, Column 8

Note that I've tried running this multiple times and I'm have the same failures consistently.
I have tried replicating it directly on Python REPL using SyncLanguageServer. Same result.

@LakshyAAAgrawal
Copy link
Collaborator

could you please try the recently integrated pyright language server instead of Jedi to see if it solves your issue?

@pracheer
Copy link

@LakshyAAAgrawal Upgraded to 0.0.15 (the latest version). Still the same error. (fwiw, I'm not sure if pyright was included in the release.)

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

No branches or pull requests

3 participants