-
Notifications
You must be signed in to change notification settings - Fork 45
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
LSP :: Error from the Language Server: KeyError: 28 (Invalid Parameters) #96
Comments
Thanks for opening this issue! Questions for you:
import random
random.|gauss Where |
I don't know how to perform the hover action yet, so I can't say if it is it or not... I was doing nothing, just waiting.
Yes and no, my emacs point is not a thin cursor, it's ... an emacs point: it spans over the whole dot between
Ohhh I tried another way, instead of stracing jedi-language-server, I straced emacs, to ensure I'll get all spawned subprocesses, just in case, and BOOM I have it:
Here it is as a Python traceback: Traceback (most recent call last):
File "/home/mdk/.local/lib/python3.9/site-packages/pygls/protocol.py", line 343, in _handle_request
self._execute_request(msg_id, handler, params)
File "/home/mdk/.local/lib/python3.9/site-packages/pygls/protocol.py", line 272, in _execute_request
method_name, method_type, msg_id, handler(params))
File "/home/mdk/.local/lib/python3.9/site-packages/jedi_language_server/server.py", line 509, in code_action
extract_function_changes = text_edit_utils.lsp_document_changes(
File "/home/mdk/.local/lib/python3.9/site-packages/jedi_language_server/text_edit_utils.py", line 33, in lsp_document_changes
return [
File "/home/mdk/.local/lib/python3.9/site-packages/jedi_language_server/text_edit_utils.py", line 64, in lsp_text_document_edits
text_edits = lsp_text_edits(changed_file)
File "/home/mdk/.local/lib/python3.9/site-packages/jedi_language_server/text_edit_utils.py", line 90, in lsp_text_edits
start = opcode_position_lookup_old[opcode.old_start]
File "/home/mdk/.local/lib/python3.9/site-packages/jedi_language_server/text_edit_utils.py", line 152, in __getitem__
raise KeyError(item)
KeyError: 28 From
|
@JulienPalard amazing info, thanks so much for digging into this and clearly laying out the problem! Please try out #99 and let me know if it resolves your issue. I've added a test case for your specific example and it now passes. |
If you're looking for tips on testing this out locally: #95 (comment) |
Based on my tests, I believe this has been closed in the latest release. @JulienPalard Please confirm, and then I'll close |
Yes, it works for me, thanks! |
I'm trying jedi-language-server for the first time, sorry I'm I don't give all relevant infos...
Using emacs 27.1 on Debian, with lsp-jedi 20200812.1826, and jedi-language-server version 0.28.3.
In a file containing:
If I point to the
dot
I get:in the minibuffer.
If you need more information, don't hesitate to ask (telling me how to gather them). I tried good old strace on jedi-language-server looking for tracebacks or KeyError but found nothing.
The text was updated successfully, but these errors were encountered: