vscode-python: python.languageServer Jedi no longer works on recent ms-python.python
Hello,
I have an issue with Pylance (it makes VMs OOM ; Opened ticket : https://github.com/microsoft/pylance-release/issues/4121) so I am contraint to use Jedi.
But the python.languageServer
Jedi no longer works on recent ms-python.python
extensions.
Issue on ms-python.python v2023.8.0, v2023.9.11361009, v2022.18.2, v2022.2.1924087327, v2022.0.1786462952 :
{'traceback': [' File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 337, in _handle_request\n self._execute_request(msg_id, handler, params)\n', ' File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 261, in _execute_request\n self._send_response(msg_id, handler(params))\n', ' File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\server.py", line 305, in definition\n jedi_script = jedi_utils.script(server.project, document)\n', ' File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\jedi_utils.py", line 108, in script\n return Script(code=document.source, path=document.path, project=project)\n', ' File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\jedi\\api\\__init__.py", line 119, in __init__\n self._inference_state = InferenceState(\n', ' File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\jedi\\inference\\__init__.py", line 90, in __init__\n self.compiled_subprocess = environment.get_inference_state_subprocess(self)\n', ' File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 106, in get_inference_state_subprocess\n return InferenceStateSubprocess(inference_state, self._get_subprocess())\n', ' File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 79, in _get_subprocess\n raise InvalidPythonEnvironment(\n'
]
}
vscode jedi.api.environment.InvalidPythonEnvironment: Could not get version information for InternalError("The subprocess python.exe has crashed (EOFError('Ran out of inputInternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input
I tried to install this but the issue remains.
waptpython -m pip install opencv-contrib-python
waptpython -m pip install opencv-python
No issues on ms-python.python v2021.12.1559732655, v2021.11.1422169775 and obviously all 2021 versions :
INFO:pygls.protocol:Sending data: {"jsonrpc": "2.0", "id": 89, "result": {"label": "Windows10", "kind": 6, "detail": "Windows10 = Version(\"10.0\", 2)", "documentation": {"kind": "markdown", "value": ""}, "sortText": "v01", "filterText": "Windows10", "insertText": "Windows10", "insertTextFormat": 1}}
INFO:pygls.protocol:Sending data: {"jsonrpc": "2.0", "id": 90, "result": null}
INFO:pygls.protocol:Sending data: {"jsonrpc": "2.0", "id": 91, "result": [{"name": "app_name", "kind": 13, "range": {"start": {"line": 3, "character": 0}, "end": {"line": 3, "character": 31}}, "selectionRange": {"start": {"line": 3, "character": 0}, "end": {"line": 3, "character": 8}}, "detail": "app_name = \".NET Framework 3.5\"", "children": []}, {"name": "install", "kind": 12, "range": {"start": {"line": 6, "character": 0}, "end": {"line": 68, "character": 65}}, "selectionRange": {"start": {"line": 6, "character": 4}, "end": {"line": 6, "character": 11}}, "detail": "def install", "children": []}, {"name": "uninstall", "kind": 12, "range": {"start": {"line": 71, "character": 0}, "end": {"line": 83, "character": 50}}, "selectionRange": {"start": {"line": 71, "character": 4}, "end": {"line": 71, "character": 13}}, "detail": "def uninstall", "children": []}, {"name": "audit", "kind": 12, "range": {"start": {"line": 86, "character": 0}, "end": {"line": 101, "character": 19}}, "selectionRange": {"start": {"line": 86, "character": 4}, "end": {"line": 86, "character": 9}}, "detail": "def audit", "children": []}]}
INFO:pygls.protocol:Sending data: {"jsonrpc": "2.0", "id": 92, "result": null}
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 20 (7 by maintainers)
@karthiknadig I don’t “want” to use Jedi but I am forced to since we got a major issue on Pylance (https://github.com/microsoft/pylance-release/issues/4121)
Its fine for me to do this on every update but sadly it didn’t seems to work.
pip install is successful after editing the command:
But it looks like the error is still the same: