-
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
Language server crashes when using rtx 3.12 installation of python. #300
Comments
Also found this log in the 'python' output:
|
I don't use rtx, so any help from someone familiar with that ecosystem would be appreciated! |
Same。
When workspace_options.environment_path is '' will raise InvalidPythonEnvironment, because:https://github.com/davidhalter/jedi/blob/740b474eda983f5b44573d1748587709e3116815/jedi/api/project.py#L244 |
seems i have a related issue here: # .....
2024-07-01 12:34:24.579 [info] [Info - 12:34:24 PM] Connection to server got closed. Server will restart.
2024-07-01 12:34:24.579 [info] true
2024-07-01 12:34:24.579 [info] [Error - 12:34:24 PM] Python Jedi client: couldn't create connection to server.
2024-07-01 12:34:24.579 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2024-07-01 12:34:24.579 [info] [Error - 12:34:24 PM] Restarting server failed
2024-07-01 12:34:24.579 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2024-07-01 12:34:25.244 [info] Traceback (most recent call last):
File "/home/stefan/.vscode-oss/extensions/ms-python.python-2024.8.1-universal/python_files/run-jedi-language-server.py", line 9, in <module>
from jedi_language_server.cli import cli # noqa: E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stefan/.vscode-oss/extensions/ms-python.python-2024.8.1-universal/python_files/lib/jedilsp/jedi_language_server/cli.py", line 8, in <module>
from .server import SERVER
File "/home/stefan/.vscode-oss/extensions/ms-python.python-2024.8.1-universal/python_files/lib/jedilsp/jedi_language_server/server.py", line 68, in <module>
from pygls.protocol import LanguageServerProtocol, lsp_method
2024-07-01 12:34:25.244 [info] File "/home/stefan/.vscode-oss/extensions/ms-python.python-2024.8.1-universal/python_files/lib/jedilsp/pygls/protocol.py", line 43, in <module>
from pygls.feature_manager import FeatureManager, assign_help_attrs, is_thread_function
File "/home/stefan/.vscode-oss/extensions/ms-python.python-2024.8.1-universal/python_files/lib/jedilsp/pygls/feature_manager.py", line 28, in <module>
from pygls.lsp import get_method_options_type, is_instance
File "/home/stefan/.vscode-oss/extensions/ms-python.python-2024.8.1-universal/python_files/lib/jedilsp/pygls/lsp/__init__.py", line 36, in <module>
from typeguard import check_type
File "/home/stefan/.vscode-oss/extensions/ms-python.python-2024.8.1-universal/python_files/lib/jedilsp/typeguard/__init__.py", line 47, in <module>
load_plugins()
File "/home/stefan/.vscode-oss/extensions/ms-python.python-2024.8.1-universal/python_files/lib/jedilsp/typeguard/_checkers.py", line 770, in load_plugins
2024-07-01 12:34:25.244 [info] for ep in entry_points(group="typeguard.checker_lookup"):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 913, in entry_points
2024-07-01 12:34:25.245 [info] return EntryPoints(eps).select(**params)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 910, in <genexpr>
2024-07-01 12:34:25.245 [info] eps = itertools.chain.from_iterable(
^
File "/usr/lib/python3.12/importlib/metadata/_itertools.py", line 16, in unique_everseen
k = key(element)
^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 835, in _normalized_name
2024-07-01 12:34:25.245 [info] or super()._normalized_name
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 462, in _normalized_name
2024-07-01 12:34:25.245 [info] return Prepared.normalize(self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 762, in normalize
2024-07-01 12:34:25.245 [info] return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/re/__init__.py", line 186, in sub
2024-07-01 12:34:25.246 [info] return _compile(pattern, flags).sub(repl, string, count)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-01 12:34:25.246 [info] TypeError: expected string or bytes-like object, got 'NoneType'
2024-07-01 12:34:25.397 [info] [Error - 12:34:25 PM] Server process exited with code 1.
2024-07-01 12:34:25.398 [info] [Error - 12:34:25 PM] Server initialization failed.
2024-07-01 12:34:25.398 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2024-07-01 12:34:25.398 [info] [Error - 12:34:25 PM] The Python Jedi server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
2024-07-01 12:34:25.398 [info] [Error - 12:34:25 PM] Python Jedi client: couldn't create connection to server.
2024-07-01 12:34:25.398 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2024-07-01 12:34:25.399 [info] [Error - 12:34:25 PM] Restarting server failed
2024-07-01 12:34:25.399 [info] Message: Pending response rejected since connection got disposed
Code: -32097 my system Codium:
python --version
Python 3.12.3
i can follow @bstaint explanation. |
seems this issue is related.. |
I have recently switched from vscode to vscodium, and therefore also from pylance to jedi. On my laptop it works just fine, but on my desktop where i most often do things, and installed python through rtx, codium and jedi recently started having problems. I get this in the 'python language server' output of codium:
and after a reinstall codium does not even automatically find the installation, which it did before. The interpreter path is set to the python executable.
The text was updated successfully, but these errors were encountered: