microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.33k stars 1.19k forks source link

python.languageServer Jedi no longer works on recent ms-python.python #21265

Closed jpele-tis closed 9 months ago

jpele-tis commented 1 year ago

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}
karthiknadig commented 1 year ago

This seems like an issue with https://github.com/pappasam/jedi-language-server/ Please file a bug on that. Older version of python extension shipped an older version of the jedi language server.

Python extension 2021.12. we used jedi-language-server==0.34.12 Python extension 2022.0. we used jedi-language-server==0.35.1 Python extension 2023.8.0 we use jedi-language-server==0.40.0

jpele-tis commented 1 year ago

Hello @karthiknadig, thanks for your reply,

I have tried to copy Jedi files from ms-python.python v2021.12.1559732655 to Python extension 2023.8.0 as a workaround, but unfortunately it does not seem to work and strangely the same problem occurs.

2023-05-22 11:05:20.485 [info]   Message: jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")
  Code: -32602 
{'traceback': ['  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 331, 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 260, in _execute_request\n    method_name, method_type, 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 192, in completion\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 68, 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 118, 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']}

I am commenting an opened ticket for this issue : https://github.com/pappasam/jedi-language-server/issues/266

hlafaille commented 1 year ago

Hello @karthiknadig, thanks for your reply,

I have tried to copy Jedi files from ms-python.python v2021.12.1559732655 to Python extension 2023.8.0 as a workaround, but unfortunately it does not seem to work and strangely the same problem occurs.

2023-05-22 11:05:20.485 [info]   Message: jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")
  Code: -32602 
{'traceback': ['  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.8.0\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 331, 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 260, in _execute_request\n    method_name, method_type, 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 192, in completion\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 68, 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 118, 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']}

I am commenting an opened ticket for this issue : https://github.com/pappasam/jedi-language-server/issues/266

Same issue here

karthiknadig commented 1 year ago

@jpele-tis If you want to use a older Jedi with a newer python extension. Do this, unfortunately this will have to be done on each update of the extension. Don't replace all the python files, just the jedi files. From a terminal navigate to extension directory first, use the minimum version of python you have on your system. In our builds we use python 3.7

>cd C:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.8.0
> py -3.7 -m pip install -t ./pythonFiles/lib/jedilsp --implementation py --platform any --abi none -U jedi-language-server
jpele-tis commented 1 year ago

@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:

PS C:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0> &waptpython -m pip install -t ./pythonFiles/lib/jedilsp -U jedi-language-server
Collecting jedi-language-server
  Using cached jedi_language_server-0.40.0-py3-none-any.whl (31 kB)
Collecting docstring-to-markdown<1.0.0
  Using cached docstring_to_markdown-0.12-py3-none-any.whl (18 kB)
Collecting lsprotocol>=2022.0.0a9
  Using cached lsprotocol-2023.0.0a2-py3-none-any.whl (69 kB)
Collecting pygls<2.0.0,>=1.0.0
  Using cached pygls-1.0.2-py3-none-any.whl (38 kB)
Collecting pydantic<2.0.0,>=1.9.1
  Using cached pydantic-1.10.11-py3-none-any.whl (158 kB)
Collecting jedi<0.19.0,>=0.18.1
  Using cached jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)
Collecting parso<0.9.0,>=0.8.0
  Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting attrs>=21.3.0
  Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting cattrs
  Using cached cattrs-23.1.2-py3-none-any.whl (50 kB)
Collecting typing-extensions>=4.2.0
  Using cached typing_extensions-4.7.1-py3-none-any.whl (33 kB)
Collecting typeguard<4,>=3
  Using cached typeguard-3.0.2-py3-none-any.whl (30 kB)
Collecting importlib-metadata>=3.6
  Using cached importlib_metadata-6.8.0-py3-none-any.whl (22 kB)
Collecting exceptiongroup
  Using cached exceptiongroup-1.1.2-py3-none-any.whl (14 kB)
Collecting zipp>=0.5
  Using cached zipp-3.16.2-py3-none-any.whl (7.2 kB)
Installing collected packages: zipp, typing-extensions, exceptiongroup, attrs, importlib-metadata, cattrs, typeguard, parso, lsprotocol, pygls, pydantic, jedi, docstring-to-markdown, jedi-language-server
Successfully installed attrs-23.1.0 cattrs-23.1.2 docstring-to-markdown-0.12 exceptiongroup-1.1.2 importlib-metadata-6.8.0 jedi-0.18.2 jedi-language-server-0.40.0 lsprotocol-2023.0.0a2 parso-0.8.3 pydantic-1.10.11 pygls-1.0.2 typeguard-3.0.2 typing-extensions-4.7.1 zipp-3.16.2
WARNING: You are using pip version 21.3.1; however, version 23.2 is available.
You should consider upgrading via the 'C:\Program Files (x86)\wapt\waptpython.exe -m pip install --upgrade pip' command.

But it looks like the error is still the same:

2023-07-17 17:02:21.890 [info] ERROR:pygls.protocol:Failed to handle request 2 textDocument/codeAction CodeActionParams(text_document=TextDocumentIdentifier(uri='file:///c%3A/waptdev/wapt-packages/vscode-python/all/setup.py'), range=0:0-173:0, context=CodeActionContext(diagnostics=[], only=None, trigger_kind=<CodeActionTriggerKind.Automatic: 2>), work_done_token=None, partial_result_token=None)
Traceback (most recent call last):
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi\inference\compiled\subprocess\__init__.py", line 249, in _send
    is_exception, traceback, result = pickle_load(self._get_process().stdout)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi\_compatibility.py", line 12, in pickle_load
    return pickle.load(file)
EOFError: Ran out of input

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 77, in _get_subprocess
    info = self._subprocess._send(None, _get_info)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi\inference\compiled\subprocess\__init__.py", line 257, in _send
    raise InternalError(
jedi.api.exceptions.InternalError: The subprocess C:\Program Files (x86)\wapt\Scripts\python.exe has crashed (EOFError('Ran out of input'), stderr=).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\pygls\protocol.py", line 340, in _handle_request
    self._execute_request(msg_id, handler, params)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\pygls\protocol.py", line 264, in _execute_request
    self._send_response(msg_id, handler(params))
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi_language_server\server.py", line 547, in code_action
    jedi_script = jedi_utils.script(server.project, document)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi_language_server\jedi_utils.py", line 108, in script
    return Script(code=document.source, path=document.path, project=project)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi\api\__init__.py", line 119, in __init__
    self._inference_state = InferenceState(
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi\inference\__init__.py", line 90, in __init__
    self.compiled_subprocess = environment.get_inference_state_subprocess(self)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 106, in get_inference_state_subprocess
    return InferenceStateSubprocess(inference_state, self._get_subprocess())
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.12.0\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 79, in _get_subprocess
    raise InvalidPythonEnvironment(
jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")

2023-07-17 17:02:21.892 [info] [Error - 5:02:21 PM] Request textDocument/codeAction failed.
2023-07-17 17:02:21.892 [info]   Message: jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")
  Code: -32602 
{'traceback': ['  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.12.0\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 340, in _handle_request\n    self._execute_request(msg_id, handler, params)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.12.0\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 264, in _execute_request\n    self._send_response(msg_id, handler(params))\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.12.0\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\server.py", line 547, in code_action\n    jedi_script = jedi_utils.script(server.project, document)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.12.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.12.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.12.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.12.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.12.0\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 79, in _get_subprocess\n    raise InvalidPythonEnvironment(\n']}
jianboy commented 9 months ago
{'traceback': ['  File "c:\\Users\\xxx\\.vscode\\extensions\\ms-python.python-2023.22.1\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 340, in _handle_request\n    self._execute_request(msg_id, handler, params)\n', '  File "c:\\Users\\xxx\\.vscode\\extensions\\ms-python.python-2023.22.1\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 264, in _execute_request\n    self._send_response(msg_id, handler(params))\n                                ^^^^^^^^^^^^^^^\n', '  File "c:\\Users\\xxx\\.vscode\\extensions\\ms-python.python-2023.22.1\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\server.py", line 549, in code_action\n    jedi_script = jedi_utils.script(server.project, document)\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "c:\\Users\\xxx\\.vscode\\extensions\\ms-python.python-2023.22.1\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\jedi_utils.py", line 118, in script\n    return Script(code=document.source, path=document.path, project=project)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "c:\\Users\\xxx\\.vscode\\extensions\\ms-python.python-2023.22.1\\pythonFiles\\lib\\jedilsp\\jedi\\api\\__init__.py", line 119, in __init__\n    self._inference_state = InferenceState(\n                            ^^^^^^^^^^^^^^^\n', '  File "c:\\Users\\xxx\\.vscode\\extensions\\ms-python.python-2023.22.1\\pythonFiles\\lib\\jedilsp\\jedi\\inference\\__init__.py", line 87, in __init__\n    environment = project.get_environment()\n                  ^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "c:\\Users\\xxx\\.vscode\\extensions\\ms-python.python-2023.22.1\\pythonFiles\\lib\\jedilsp\\jedi\\api\\project.py", line 245, in get_environment\n    self._environment = create_environment(self._environment_path, safe=False)\n                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "c:\\Users\\xxx\\.vscode\\extensions\\ms-python.python-2023.22.1\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 367, in create_environment\n    return Environment(_get_executable_path(path, safe=safe), env_vars=env_vars)\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "c:\\Users\\xxx\\.vscode\\extensions\\ms-python.python-2023.22.1\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 380, in _get_executable_path\n    raise InvalidPythonEnvironment("%s seems to be missing." % python)\n']}

image

change it to Pylance, but Pylance is very slow.

karthiknadig commented 9 months ago

This issue should be addressed in the pre-release (at least the parts where we pass paths to Jedi).

jpele-tis commented 9 months ago

This issue should be addressed in the pre-release (at least the parts where we pass paths to Jedi).

Thank you for the follow up but it seems that the issue remains the same on pre-release 2023.25.10221012 :

Traceback (most recent call last):
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\inference\compiled\subprocess\__init__.py", line 249, in _send
    is_exception, traceback, result = pickle_load(self._get_process().stdout)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\_compatibility.py", line 12, in pickle_load
    return pickle.load(file)
EOFError: Ran out of input

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 77, in _get_subprocess
    info = self._subprocess._send(None, _get_info)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\inference\compiled\subprocess\__init__.py", line 257, in _send
    raise InternalError(
jedi.api.exceptions.InternalError: The subprocess C:\Program Files (x86)\wapt\Scripts\python.exe has crashed (EOFError('Ran out of input'), stderr=).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\pygls\protocol.py", line 340, in _handle_request
    self._execute_request(msg_id, handler, params)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\pygls\protocol.py", line 264, in _execute_request
    self._send_response(msg_id, handler(params))
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi_language_server\server.py", line 207, in completion
    jedi_script = jedi_utils.script(server.project, document)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi_language_server\jedi_utils.py", line 118, in script
    return Script(code=document.source, path=document.path, project=project)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\__init__.py", line 119, in __init__
    self._inference_state = InferenceState(
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\inference\__init__.py", line 87, in __init__
    environment = project.get_environment()
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\project.py", line 245, in get_environment
    self._environment = create_environment(self._environment_path, safe=False)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 366, in create_environment
    return Environment(path, env_vars=env_vars)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 68, in __init__
    self._get_subprocess()
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 79, in _get_subprocess
    raise InvalidPythonEnvironment(
jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")

2024-01-22 14:37:11.369 [info] [Error - 2:37:11 PM] Request textDocument/completion failed.
2024-01-22 14:37:11.369 [info]   Message: jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")
  Code: -32602 
{'traceback': ['  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 340, in _handle_request\n    self._execute_request(msg_id, handler, params)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 264, in _execute_request\n    self._send_response(msg_id, handler(params))\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\server.py", line 207, in completion\n    jedi_script = jedi_utils.script(server.project, document)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\jedi_utils.py", line 118, in script\n    return Script(code=document.source, path=document.path, project=project)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\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.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\inference\\__init__.py", line 87, in __init__\n    environment = project.get_environment()\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\api\\project.py", line 245, in get_environment\n    self._environment = create_environment(self._environment_path, safe=False)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 366, in create_environment\n    return Environment(path, env_vars=env_vars)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 68, in __init__\n    self._get_subprocess()\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 79, in _get_subprocess\n    raise InvalidPythonEnvironment(\n']}
karthiknadig commented 9 months ago

Can you set python.trace.server": "verbose", and share the logs from Output > Python Language Server.

jpele-tis commented 9 months ago

Can you set python.trace.server": "verbose", and share the logs from Output > Python Language Server.

The parameter is grayed out, I am not sure if it is taken into account.

2024-01-25 12:08:16.861 [info] [Trace - 12:08:16 PM] Sending request 'textDocument/codeAction - (3)'.
2024-01-25 12:08:16.861 [info] Params: {
    "textDocument": {
        "uri": "file:///c%3A/waptdev/wapt-packages/atlas/windows/setup.py"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 0
        },
        "end": {
            "line": 0,
            "character": 0
        }
    },
    "context": {
        "diagnostics": [],
        "triggerKind": 2
    }
}

2024-01-25 12:08:16.862 [info] [Trace - 12:08:16 PM] Sending request 'textDocument/codeAction - (3)'.
2024-01-25 12:08:16.862 [info] Params: {
    "textDocument": {
        "uri": "file:///c%3A/waptdev/wapt-packages/atlas/windows/setup.py"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 0
        },
        "end": {
            "line": 0,
            "character": 0
        }
    },
    "context": {
        "diagnostics": [],
        "triggerKind": 2
    }
}

2024-01-25 12:08:16.981 [info] ERROR:pygls.protocol:Failed to handle request 3 textDocument/codeAction CodeActionParams(text_document=TextDocumentIdentifier(uri='file:///c%3A/waptdev/wapt-packages/atlas/windows/setup.py'), range=0:0-0:0, context=CodeActionContext(diagnostics=[], only=None, trigger_kind=<CodeActionTriggerKind.Automatic: 2>), work_done_token=None, partial_result_token=None)
Traceback (most recent call last):
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\inference\compiled\subprocess\__init__.py", line 249, in _send
    is_exception, traceback, result = pickle_load(self._get_process().stdout)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\_compatibility.py", line 12, in pickle_load
    return pickle.load(file)
EOFError: Ran out of input

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 77, in _get_subprocess
    info = self._subprocess._send(None, _get_info)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\inference\compiled\subprocess\__init__.py", line 257, in _send
    raise InternalError(
jedi.api.exceptions.InternalError: The subprocess C:\Program Files (x86)\wapt\Scripts\python.exe has crashed (EOFError('Ran out of input'), stderr=).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\pygls\protocol.py", line 340, in _handle_request
    self._execute_request(msg_id, handler, params)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\pygls\protocol.py", line 264, in _execute_request
    self._send_response(msg_id, handler(params))
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi_language_server\server.py", line 549, in code_action
    jedi_script = jedi_utils.script(server.project, document)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi_language_server\jedi_utils.py", line 118, in script
    return Script(code=document.source, path=document.path, project=project)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\__init__.py", line 119, in __init__
    self._inference_state = InferenceState(
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\inference\__init__.py", line 87, in __init__
    environment = project.get_environment()
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\project.py", line 245, in get_environment
    self._environment = create_environment(self._environment_path, safe=False)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 366, in create_environment
    return Environment(path, env_vars=env_vars)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 68, in __init__
    self._get_subprocess()
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2023.25.10221012\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 79, in _get_subprocess
    raise InvalidPythonEnvironment(
jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")

2024-01-25 12:08:16.982 [info] [Trace - 12:08:16 PM] Received response 'textDocument/codeAction - (3)' in 120ms. Request failed: jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).") (-32602).
2024-01-25 12:08:16.982 [info] Error data: "{'traceback': ['  File \"c:\\\\Users\\\\jpadmin\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10221012\\\\pythonFiles\\\\lib\\\\jedilsp\\\\pygls\\\\protocol.py\", line 340, in _handle_request\\n    self._execute_request(msg_id, handler, params)\\n', '  File \"c:\\\\Users\\\\jpadmin\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10221012\\\\pythonFiles\\\\lib\\\\jedilsp\\\\pygls\\\\protocol.py\", line 264, in _execute_request\\n    self._send_response(msg_id, handler(params))\\n', '  File \"c:\\\\Users\\\\jpadmin\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10221012\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi_language_server\\\\server.py\", line 549, in code_action\\n    jedi_script = jedi_utils.script(server.project, document)\\n', '  File \"c:\\\\Users\\\\jpadmin\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10221012\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi_language_server\\\\jedi_utils.py\", line 118, in script\\n    return Script(code=document.source, path=document.path, project=project)\\n', '  File \"c:\\\\Users\\\\jpadmin\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10221012\\\\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.25.10221012\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\inference\\\\__init__.py\", line 87, in __init__\\n    environment = project.get_environment()\\n', '  File \"c:\\\\Users\\\\jpadmin\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10221012\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\project.py\", line 245, in get_environment\\n    self._environment = create_environment(self._environment_path, safe=False)\\n', '  File \"c:\\\\Users\\\\jpadmin\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10221012\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\environment.py\", line 366, in create_environment\\n    return Environment(path, env_vars=env_vars)\\n', '  File \"c:\\\\Users\\\\jpadmin\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10221012\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\environment.py\", line 68, in __init__\\n    self._get_subprocess()\\n', '  File \"c:\\\\Users\\\\jpadmin\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10221012\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\environment.py\", line 79, in _get_subprocess\\n    raise InvalidPythonEnvironment(\\n']}"

2024-01-25 12:08:16.983 [info] [Error - 12:08:16 PM] Request textDocument/codeAction failed.
2024-01-25 12:08:16.983 [info]   Message: jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")
  Code: -32602 
{'traceback': ['  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 340, in _handle_request\n    self._execute_request(msg_id, handler, params)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 264, in _execute_request\n    self._send_response(msg_id, handler(params))\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\server.py", line 549, in code_action\n    jedi_script = jedi_utils.script(server.project, document)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\jedi_utils.py", line 118, in script\n    return Script(code=document.source, path=document.path, project=project)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\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.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\inference\\__init__.py", line 87, in __init__\n    environment = project.get_environment()\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\api\\project.py", line 245, in get_environment\n    self._environment = create_environment(self._environment_path, safe=False)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 366, in create_environment\n    return Environment(path, env_vars=env_vars)\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 68, in __init__\n    self._get_subprocess()\n', '  File "c:\\Users\\jpadmin\\.vscode\\extensions\\ms-python.python-2023.25.10221012\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 79, in _get_subprocess\n    raise InvalidPythonEnvironment(\n']}
karthiknadig commented 9 months ago

@jpele-tis That is a hidden setting so it will be grayed out. Can you share the part in the logs where it does the Initialize request?

jpele-tis commented 9 months ago

@karthiknadig I guess it is here :

2024-01-31 15:02:20.966 [info] [Trace - 3:02:20 PM] Received response 'textDocument/completion - (9)' in 217ms. Request failed: jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).") (-32602).
2024-01-31 15:02:20.967 [info] Error data: "{'traceback': ['  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\pygls\\\\protocol.py\", line 340, in _handle_request\\n    self._execute_request(msg_id, handler, params)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\pygls\\\\protocol.py\", line 264, in _execute_request\\n    self._send_response(msg_id, handler(params))\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi_language_server\\\\server.py\", line 207, in completion\\n    jedi_script = jedi_utils.script(server.project, document)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi_language_server\\\\jedi_utils.py\", line 118, in script\\n    return Script(code=document.source, path=document.path, project=project)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\__init__.py\", line 119, in __init__\\n    self._inference_state = InferenceState(\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\inference\\\\__init__.py\", line 87, in __init__\\n    environment = project.get_environment()\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\project.py\", line 245, in get_environment\\n    self._environment = create_environment(self._environment_path, safe=False)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\environment.py\", line 366, in create_environment\\n    return Environment(path, env_vars=env_vars)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\environment.py\", line 68, in __init__\\n    self._get_subprocess()\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\environment.py\", line 79, in _get_subprocess\\n    raise InvalidPythonEnvironment(\\n']}"
karthiknadig commented 9 months ago

What I meant was this part: image

I need to see the entire request object that was sent to Jedi. From my inspection of the code we are sending the right python path to Jedi. Just want to make sure the request is sending the path as expected.

This is the important bit: image

jpele-tis commented 9 months ago

@karthiknadig oh it's only write on initialization that's why I didn't saw it :

2024-02-01 13:59:31.496 [info] [Trace - 1:59:31 PM] Sending request 'initialize - (0)'.
2024-02-01 13:59:31.497 [info] Params: {
    "processId": 15280,
    "clientInfo": {
        "name": "Visual Studio Code",
        "version": "1.85.2"
    },
    "locale": "en",
    "rootPath": "c:\\tranquilit\\waptdev\\tis-test_0_PROD-wapt",
    "rootUri": "file:///c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt",
    "capabilities": {
        "workspace": {
            "applyEdit": true,
            "workspaceEdit": {
                "documentChanges": true,
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ],
                "failureHandling": "textOnlyTransactional",
                "normalizesLineEndings": true,
                "changeAnnotationSupport": {
                    "groupsOnLabel": true
                }
            },
            "configuration": true,
            "didChangeWatchedFiles": {
                "dynamicRegistration": true,
                "relativePatternSupport": true
            },
            "symbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                },
                "resolveSupport": {
                    "properties": [
                        "location.range"
                    ]
                }
            },
            "codeLens": {
                "refreshSupport": true
            },
            "executeCommand": {
                "dynamicRegistration": true
            },
            "didChangeConfiguration": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "refreshSupport": true
            },
            "semanticTokens": {
                "refreshSupport": true
            },
            "fileOperations": {
                "dynamicRegistration": true,
                "didCreate": true,
                "didRename": true,
                "didDelete": true,
                "willCreate": true,
                "willRename": true,
                "willDelete": true
            },
            "inlineValue": {
                "refreshSupport": true
            },
            "inlayHint": {
                "refreshSupport": true
            },
            "diagnostics": {
                "refreshSupport": true
            }
        },
        "textDocument": {
            "publishDiagnostics": {
                "relatedInformation": true,
                "versionSupport": false,
                "tagSupport": {
                    "valueSet": [
                        1,
                        2
                    ]
                },
                "codeDescriptionSupport": true,
                "dataSupport": true
            },
            "synchronization": {
                "dynamicRegistration": true,
                "willSave": true,
                "willSaveWaitUntil": true,
                "didSave": true
            },
            "completion": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "completionItem": {
                    "snippetSupport": true,
                    "commitCharactersSupport": true,
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "deprecatedSupport": true,
                    "preselectSupport": true,
                    "tagSupport": {
                        "valueSet": [
                            1
                        ]
                    },
                    "insertReplaceSupport": true,
                    "resolveSupport": {
                        "properties": [
                            "documentation",
                            "detail",
                            "additionalTextEdits"
                        ]
                    },
                    "insertTextModeSupport": {
                        "valueSet": [
                            1,
                            2
                        ]
                    },
                    "labelDetailsSupport": true
                },
                "insertTextMode": 2,
                "completionItemKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25
                    ]
                },
                "completionList": {
                    "itemDefaults": [
                        "commitCharacters",
                        "editRange",
                        "insertTextFormat",
                        "insertTextMode",
                        "data"
                    ]
                }
            },
            "hover": {
                "dynamicRegistration": true,
                "contentFormat": [
                    "markdown",
                    "plaintext"
                ]
            },
            "signatureHelp": {
                "dynamicRegistration": true,
                "signatureInformation": {
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "parameterInformation": {
                        "labelOffsetSupport": true
                    },
                    "activeParameterSupport": true
                },
                "contextSupport": true
            },
            "definition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "references": {
                "dynamicRegistration": true
            },
            "documentHighlight": {
                "dynamicRegistration": true
            },
            "documentSymbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "hierarchicalDocumentSymbolSupport": true,
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                },
                "labelSupport": true
            },
            "codeAction": {
                "dynamicRegistration": true,
                "isPreferredSupport": true,
                "disabledSupport": true,
                "dataSupport": true,
                "resolveSupport": {
                    "properties": [
                        "edit"
                    ]
                },
                "codeActionLiteralSupport": {
                    "codeActionKind": {
                        "valueSet": [
                            "",
                            "quickfix",
                            "refactor",
                            "refactor.extract",
                            "refactor.inline",
                            "refactor.rewrite",
                            "source",
                            "source.organizeImports"
                        ]
                    }
                },
                "honorsChangeAnnotations": true
            },
            "codeLens": {
                "dynamicRegistration": true
            },
            "formatting": {
                "dynamicRegistration": true
            },
            "rangeFormatting": {
                "dynamicRegistration": true,
                "rangesSupport": true
            },
            "onTypeFormatting": {
                "dynamicRegistration": true
            },
            "rename": {
                "dynamicRegistration": true,
                "prepareSupport": true,
                "prepareSupportDefaultBehavior": 1,
                "honorsChangeAnnotations": true
            },
            "documentLink": {
                "dynamicRegistration": true,
                "tooltipSupport": true
            },
            "typeDefinition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "implementation": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true,
                "foldingRangeKind": {
                    "valueSet": [
                        "comment",
                        "imports",
                        "region"
                    ]
                },
                "foldingRange": {
                    "collapsedText": false
                }
            },
            "declaration": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "selectionRange": {
                "dynamicRegistration": true
            },
            "callHierarchy": {
                "dynamicRegistration": true
            },
            "semanticTokens": {
                "dynamicRegistration": true,
                "tokenTypes": [
                    "namespace",
                    "type",
                    "class",
                    "enum",
                    "interface",
                    "struct",
                    "typeParameter",
                    "parameter",
                    "variable",
                    "property",
                    "enumMember",
                    "event",
                    "function",
                    "method",
                    "macro",
                    "keyword",
                    "modifier",
                    "comment",
                    "string",
                    "number",
                    "regexp",
                    "operator",
                    "decorator"
                ],
                "tokenModifiers": [
                    "declaration",
                    "definition",
                    "readonly",
                    "static",
                    "deprecated",
                    "abstract",
                    "async",
                    "modification",
                    "documentation",
                    "defaultLibrary"
                ],
                "formats": [
                    "relative"
                ],
                "requests": {
                    "range": true,
                    "full": {
                        "delta": true
                    }
                },
                "multilineTokenSupport": false,
                "overlappingTokenSupport": false,
                "serverCancelSupport": true,
                "augmentsSyntaxTokens": true
            },
            "linkedEditingRange": {
                "dynamicRegistration": true
            },
            "typeHierarchy": {
                "dynamicRegistration": true
            },
            "inlineValue": {
                "dynamicRegistration": true
            },
            "inlayHint": {
                "dynamicRegistration": true,
                "resolveSupport": {
                    "properties": [
                        "tooltip",
                        "textEdits",
                        "label.tooltip",
                        "label.location",
                        "label.command"
                    ]
                }
            },
            "diagnostic": {
                "dynamicRegistration": true,
                "relatedDocumentSupport": false
            }
        },
        "window": {
            "showMessage": {
                "messageActionItem": {
                    "additionalPropertiesSupport": true
                }
            },
            "showDocument": {
                "support": true
            },
            "workDoneProgress": true
        },
        "general": {
            "staleRequestSupport": {
                "cancel": true,
                "retryOnContentModified": [
                    "textDocument/semanticTokens/full",
                    "textDocument/semanticTokens/range",
                    "textDocument/semanticTokens/full/delta"
                ]
            },
            "regularExpressions": {
                "engine": "ECMAScript",
                "version": "ES2020"
            },
            "markdown": {
                "parser": "marked",
                "version": "1.1.0"
            },
            "positionEncodings": [
                "utf-16"
            ]
        },
        "notebookDocument": {
            "synchronization": {
                "dynamicRegistration": true,
                "executionSummarySupport": true
            }
        }
    },
    "initializationOptions": {
        "markupKindPreferred": "markdown",
        "completion": {
            "resolveEagerly": false,
            "disableSnippets": true
        },
        "diagnostics": {
            "enable": true,
            "didOpen": true,
            "didSave": true,
            "didChange": true
        },
        "hover": {
            "disable": {
                "keyword": {
                    "all": true
                }
            }
        },
        "workspace": {
            "extraPaths": [
                "c:\\tranquilit\\waptdev\\tis-test_0_PROD-wapt"
            ],
            "environmentPath": "C:\\Program Files (x86)\\wapt\\Scripts\\python.exe",
            "symbols": {
                "maxSymbols": 0
            }
        }
    },
    "trace": "verbose",
    "workspaceFolders": [
        {
            "uri": "file:///c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt",
            "name": "tis-test_0_PROD-wapt"
        }
    ]
}

2024-02-01 13:59:36.566 [info] [Trace - 1:59:36 PM] Received response 'initialize - (0)' in 5333ms.
2024-02-01 13:59:36.567 [info] Result: {
    "capabilities": {
        "textDocumentSync": {
            "openClose": true,
            "change": 2,
            "willSave": false,
            "willSaveWaitUntil": false,
            "save": true
        },
        "completionProvider": {
            "triggerCharacters": [
                ".",
                "'",
                "\""
            ],
            "resolveProvider": true
        },
        "hoverProvider": true,
        "signatureHelpProvider": {
            "triggerCharacters": [
                "(",
                ","
            ]
        },
        "definitionProvider": true,
        "typeDefinitionProvider": {},
        "referencesProvider": true,
        "documentHighlightProvider": true,
        "documentSymbolProvider": true,
        "codeActionProvider": {
            "codeActionKinds": [
                "refactor.inline",
                "refactor.extract"
            ]
        },
        "workspaceSymbolProvider": true,
        "renameProvider": true,
        "executeCommandProvider": {
            "commands": []
        },
        "workspace": {
            "workspaceFolders": {
                "supported": true,
                "changeNotifications": true
            },
            "fileOperations": {}
        }
    },
    "serverInfo": {
        "name": "jedi-language-server",
        "version": "0.19.1"
    }
}

2024-02-01 13:59:36.568 [info] [Trace - 1:59:36 PM] Sending notification 'initialized'.
2024-02-01 13:59:36.568 [info] Params: {}

2024-02-01 13:59:36.579 [info] [Trace - 1:59:36 PM] Sending notification 'textDocument/didOpen'.
2024-02-01 13:59:36.579 [info] Params: {
    "textDocument": {
        "uri": "file:///c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt/setup.py",
        "languageId": "python",
        "version": 1,
        "text": "# -*- coding: utf-8 -*-\nfrom setuphelpers import *\n\ndef install():\n    install_ex\n\n\n\n"
    }
}

2024-02-01 13:59:36.580 [info] [Trace - 1:59:36 PM] Sending notification 'textDocument/didOpen'.
2024-02-01 13:59:36.580 [info] Params: {
    "textDocument": {
        "uri": "untitled:/c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt/update_package.py",
        "languageId": "python",
        "version": 1,
        "text": ""
    }
}

2024-02-01 13:59:36.580 [info] [Trace - 1:59:36 PM] Sending notification 'workspace/didChangeConfiguration'.
2024-02-01 13:59:36.580 [info] Params: {
    "settings": {
        "python": {
            "activeStateToolPath": "state",
            "autoComplete": {
                "extraPaths": []
            },
            "createEnvironment": {
                "contentButton": "show",
                "trigger": "off"
            },
            "condaPath": "",
            "defaultInterpreterPath": "C:\\Program Files (x86)\\wapt\\waptpython.exe",
            "diagnostics": {
                "sourceMapsEnabled": false
            },
            "envFile": "${workspaceFolder}/.env",
            "experiments": {
                "enabled": true,
                "optInto": [],
                "optOutFrom": []
            },
            "globalModuleInstallation": false,
            "languageServer": "Jedi",
            "interpreter": {
                "infoVisibility": "onPythonRelated"
            },
            "logging": {
                "level": "error"
            },
            "missingPackage": {
                "severity": "Hint"
            },
            "pipenvPath": "pipenv",
            "poetryPath": "poetry",
            "tensorBoard": {
                "logDirectory": ""
            },
            "terminal": {
                "activateEnvInCurrentTerminal": false,
                "activateEnvironment": true,
                "executeInFileDir": false,
                "focusAfterLaunch": false,
                "launchArgs": []
            },
            "REPL": {
                "enableREPLSmartSend": true
            },
            "testing": {
                "autoTestDiscoverOnSaveEnabled": true,
                "cwd": null,
                "debugPort": 3000,
                "promptToConfigure": true,
                "pytestArgs": [],
                "pytestEnabled": false,
                "pytestPath": "pytest",
                "unittestArgs": [
                    "-v",
                    "-s",
                    ".",
                    "-p",
                    "*test*.py"
                ],
                "unittestEnabled": false
            },
            "venvFolders": [],
            "venvPath": "",
            "formatting": {
                "provider": "black",
                "blackArgs": [
                    "--line-length",
                    "150"
                ]
            },
            "trace": {
                "server": "verbose"
            },
            "pythonPath": "C:\\Program Files (x86)\\wapt\\waptpython.exe",
            "wapt-get": "C:\\Program Files (x86)\\wapt\\wapt-get.py"
        }
    }
}

2024-02-01 13:59:36.719 [info] [Trace - 1:59:36 PM] Sending request 'textDocument/codeAction - (1)'.
2024-02-01 13:59:36.720 [info] Params: {
    "textDocument": {
        "uri": "file:///c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt/setup.py"
    },
    "range": {
        "start": {
            "line": 4,
            "character": 14
        },
        "end": {
            "line": 4,
            "character": 14
        }
    },
    "context": {
        "diagnostics": [],
        "triggerKind": 2
    }
}

2024-02-01 13:59:37.132 [info] [Trace - 1:59:37 PM] Sending notification '$/setTrace'.
2024-02-01 13:59:37.132 [info] Params: {
    "value": "verbose"
}

2024-02-01 13:59:37.353 [info] ERROR:pygls.protocol:Failed to handle request 1 textDocument/codeAction CodeActionParams(text_document=TextDocumentIdentifier(uri='file:///c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt/setup.py'), range=4:14-4:14, context=CodeActionContext(diagnostics=[], only=None, trigger_kind=<CodeActionTriggerKind.Automatic: 2>), work_done_token=None, partial_result_token=None)
Traceback (most recent call last):
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\inference\compiled\subprocess\__init__.py", line 249, in _send
    is_exception, traceback, result = pickle_load(self._get_process().stdout)
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\_compatibility.py", line 12, in pickle_load
    return pickle.load(file)
EOFError: Ran out of input

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 77, in _get_subprocess
    info = self._subprocess._send(None, _get_info)
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\inference\compiled\subprocess\__init__.py", line 257, in _send
    raise InternalError(
jedi.api.exceptions.InternalError: The subprocess C:\Program Files (x86)\wapt\Scripts\python.exe has crashed (EOFError('Ran out of input'), stderr=).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\pygls\protocol.py", line 340, in _handle_request
    self._execute_request(msg_id, handler, params)
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\pygls\protocol.py", line 264, in _execute_request
    self._send_response(msg_id, handler(params))
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi_language_server\server.py", line 549, in code_action
    jedi_script = jedi_utils.script(server.project, document)
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi_language_server\jedi_utils.py", line 118, in script
    return Script(code=document.source, path=document.path, project=project)
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\api\__init__.py", line 119, in __init__
    self._inference_state = InferenceState(
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\inference\__init__.py", line 87, in __init__
    environment = project.get_environment()
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\api\project.py", line 245, in get_environment
    self._environment = create_environment(self._environment_path, safe=False)
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 366, in create_environment
    return Environment(path, env_vars=env_vars)
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 68, in __init__
    self._get_subprocess()
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\api\environment.py", line 79, in _get_subprocess
    raise InvalidPythonEnvironment(
jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")

2024-02-01 13:59:37.358 [info] [Trace - 1:59:37 PM] Received response 'textDocument/codeAction - (1)' in 639ms. Request failed: jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).") (-32602).
2024-02-01 13:59:37.359 [info] Error data: "{'traceback': ['  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\pygls\\\\protocol.py\", line 340, in _handle_request\\n    self._execute_request(msg_id, handler, params)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\pygls\\\\protocol.py\", line 264, in _execute_request\\n    self._send_response(msg_id, handler(params))\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi_language_server\\\\server.py\", line 549, in code_action\\n    jedi_script = jedi_utils.script(server.project, document)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi_language_server\\\\jedi_utils.py\", line 118, in script\\n    return Script(code=document.source, path=document.path, project=project)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\__init__.py\", line 119, in __init__\\n    self._inference_state = InferenceState(\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\inference\\\\__init__.py\", line 87, in __init__\\n    environment = project.get_environment()\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\project.py\", line 245, in get_environment\\n    self._environment = create_environment(self._environment_path, safe=False)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\environment.py\", line 366, in create_environment\\n    return Environment(path, env_vars=env_vars)\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\environment.py\", line 68, in __init__\\n    self._get_subprocess()\\n', '  File \"c:\\\\Users\\\\jpele\\\\.vscode\\\\extensions\\\\ms-python.python-2023.25.10292213\\\\pythonFiles\\\\lib\\\\jedilsp\\\\jedi\\\\api\\\\environment.py\", line 79, in _get_subprocess\\n    raise InvalidPythonEnvironment(\\n']}"

2024-02-01 13:59:37.359 [info] [Error - 1:59:37 PM] Request textDocument/codeAction failed.
2024-02-01 13:59:37.359 [info]   Message: jedi.api.environment.InvalidPythonEnvironment: Could not get version information for 'C:\\Program Files (x86)\\wapt\\Scripts\\python.exe': InternalError("The subprocess C:\\Program Files (x86)\\wapt\\Scripts\\python.exe has crashed (EOFError('Ran out of input'), stderr=).")
  Code: -32602 
{'traceback': ['  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 340, in _handle_request\n    self._execute_request(msg_id, handler, params)\n', '  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\pygls\\protocol.py", line 264, in _execute_request\n    self._send_response(msg_id, handler(params))\n', '  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\server.py", line 549, in code_action\n    jedi_script = jedi_utils.script(server.project, document)\n', '  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\jedi_language_server\\jedi_utils.py", line 118, in script\n    return Script(code=document.source, path=document.path, project=project)\n', '  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\jedi\\api\\__init__.py", line 119, in __init__\n    self._inference_state = InferenceState(\n', '  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\jedi\\inference\\__init__.py", line 87, in __init__\n    environment = project.get_environment()\n', '  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\jedi\\api\\project.py", line 245, in get_environment\n    self._environment = create_environment(self._environment_path, safe=False)\n', '  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 366, in create_environment\n    return Environment(path, env_vars=env_vars)\n', '  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 68, in __init__\n    self._get_subprocess()\n', '  File "c:\\Users\\jpele\\.vscode\\extensions\\ms-python.python-2023.25.10292213\\pythonFiles\\lib\\jedilsp\\jedi\\api\\environment.py", line 79, in _get_subprocess\n    raise InvalidPythonEnvironment(\n']}
2024-02-01 13:59:37.669 [info] [Trace - 1:59:37 PM] Sending notification '$/setTrace'.
2024-02-01 13:59:37.669 [info] Params: {
    "value": "verbose"
}

2024-02-01 13:59:37.712 [info] [Trace - 1:59:37 PM] Received notification 'textDocument/publishDiagnostics'.
2024-02-01 13:59:37.712 [info] Params: {
    "uri": "file:///c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt/setup.py",
    "diagnostics": []
}

2024-02-01 13:59:37.777 [info] [Trace - 1:59:37 PM] Received notification 'textDocument/publishDiagnostics'.
2024-02-01 13:59:37.777 [info] Params: {
    "uri": "untitled:/c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt/update_package.py",
    "diagnostics": []
}

2024-02-01 13:59:38.118 [info] [Trace - 1:59:38 PM] Sending request 'textDocument/codeAction - (2)'.
2024-02-01 13:59:38.118 [info] Params: {
    "textDocument": {
        "uri": "file:///c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt/setup.py"
    },
    "range": {
        "start": {
            "line": 4,
            "character": 14
        },
        "end": {
            "line": 4,
            "character": 14
        }
    },
    "context": {
        "diagnostics": [],
        "triggerKind": 2
    }
}

2024-02-01 13:59:38.191 [info] [Trace - 1:59:38 PM] Sending notification '$/setTrace'.
2024-02-01 13:59:38.191 [info] Params: {
    "value": "verbose"
}

2024-02-01 13:59:38.411 [info] [Trace - 1:59:38 PM] Sending request 'textDocument/documentSymbol - (3)'.
2024-02-01 13:59:38.412 [info] Params: {
    "textDocument": {
        "uri": "file:///c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt/setup.py"
    }
}

2024-02-01 13:59:38.436 [info] ERROR:pygls.protocol:Failed to handle request 2 textDocument/codeAction CodeActionParams(text_document=TextDocumentIdentifier(uri='file:///c%3A/tranquilit/waptdev/tis-test_0_PROD-wapt/setup.py'), range=4:14-4:14, context=CodeActionContext(diagnostics=[], only=None, trigger_kind=<CodeActionTriggerKind.Automatic: 2>), work_done_token=None, partial_result_token=None)
Traceback (most recent call last):
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\inference\compiled\subprocess\__init__.py", line 249, in _send
    is_exception, traceback, result = pickle_load(self._get_process().stdout)
  File "c:\Users\jpele\.vscode\extensions\ms-python.python-2023.25.10292213\pythonFiles\lib\jedilsp\jedi\_compatibility.py", line 12, in pickle_load
    return pickle.load(file)
EOFError: Ran out of input
karthiknadig commented 9 months ago

@jpele-tis This looks like a bug in jedi itself, I have filed a bug here: https://github.com/davidhalter/jedi/issues/1984

davidhalter commented 9 months ago

It really feels like this is something special. I have almost never had complaints like this.

@jpele-tis What is special about your environment? C:\\Program Files (x86)\\wapt\\Scripts\\python.exe seems to not work normally (or at least have different import behavior or whatever). Do you have a special Python version?

jpele-tis commented 8 months ago

hello @davidhalter we are compiling the latest version of Python 3.8 (v3.8.18)

image here the pth file:

python38.zip
.
DLLs
import site
davidhalter commented 8 months ago

If you are compiling Python yourself, I'm pretty sure you have an issue somewhere there. Your Python seems to behave not normally.

jpele-tis commented 8 months ago

@karthiknadig

"C:\Program Files (x86)\wapt\waptpython.exe" c:\Users\jpadmin\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher 58783 -- "C:\Program Files (x86)\wapt\wapt-get.py" uninstall --no-ide C:\waptdev\wapt-packages\linphone\windows

"C:\Program Files (x86)\wapt\waptpython.exe" c:\Users\jpadmin\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy --connect 127.0.0.1:58783 --configure-qt none --adapter-access-token a3cacaba276cfc656f7a32ae03d6817642b74bb15406264f329a1e146db5613c "C:\Program Files (x86)\wapt\wapt-get.py" uninstall --no-ide C:\waptdev\wapt-packages\linphone\windows

C:\Users\jpadmin>"C:\Program Files (x86)\wapt\waptpython.exe" c:\Users\jpadmin\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher 58784 -- "C:\Program Files (x86)\wapt\wapt-get.py" uninstall --no-ide C:\waptdev\wapt-packages\linphone\windows
Traceback (most recent call last):
  File "runpy.py", line 194, in _run_module_as_main
  File "runpy.py", line 87, in _run_code
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher\__main__.py", line 97, in <module>
    main()
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher\__main__.py", line 53, in main
    launcher.connect(host, port)
  File "c:\Users\jpadmin\.vscode\extensions\ms-python.python-2021.12.1559732655\pythonFiles\lib\python\debugpy\launcher/../..\debugpy\launcher\__init__.py", line 34, in connect
    sock.connect((host, port))
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

We are trying to debug by ourselves but we're unable to launch a debug server to go further, can you please advise ?

int19h commented 8 months ago

@jpele-tis Can you try enabling debugger logging by adding "logToFile":true in your launch.json and share debugpy*.log that it will produce in the folder where extension is installed (the path that you see in the terminal when launching)? I suspect the issue here also has to do with custom Python, but the logs might be able to tell us more.