LSP-ruff icon indicating copy to clipboard operation
LSP-ruff copied to clipboard

`Exception: ϵͳҲָ·` in install_or_update

Open maryjeck opened this issue 2 years ago • 14 comments

plugins loaded Package Control: Skipping automatic upgrade, last run at 2023-04-11 09:58:44, next run at 2023-04-11 10:58:44 or after Unable to start subprocess for LSP-ruff Traceback (most recent call last): File "D:\sublime_text\Data\Installed Packages\LSP.sublime-package\plugin/core/windows.py", line 241, in start_async plugin_class.install_or_update() File "D:\sublime_text\Data\Packages\lsp_utils\st3\lsp_utils_client_handler\abstract_plugin.py", line 109, in install_or_update server.install_or_update() File "D:\sublime_text\Data\Packages\lsp_utils\st3\lsp_utils\server_pip_resource.py", line 100, in install_or_update self.run(self.pip_binary(), 'install', '-r', dest_requirements_txt_path, '--disable-pip-version-check') File "D:\sublime_text\Data\Packages\lsp_utils\st3\lsp_utils\server_pip_resource.py", line 35, in run raise Exception(error) Exception: ϵͳҲָ·

maryjeck avatar Apr 11 '23 02:04 maryjeck

What's your LSP, ST and OS version? Do you have Python installed? Is the Python module venv (python3-venv in Linux repos) installed?

LDAP avatar Apr 11 '23 10:04 LDAP

I use ST4 in win11 I choose python3 in msys2, and I put the PATH to the system environment variable.

maryjeck avatar Apr 12 '23 05:04 maryjeck

What happens if you run python -m venv in a terminal?

LDAP avatar Apr 12 '23 07:04 LDAP

python -m venv : it show venv: error: the following arguments are required: ENV_DIR

python -m venv . : it create a environment.

maryjeck avatar Apr 13 '23 07:04 maryjeck

Can you check if there is an error in the LSP Log Panel? You can open the panel by executing the command LSP: Toggle Log Panel

LDAP avatar Apr 13 '23 07:04 LDAP

Is it means that " tools -> lsp -> Toggle Log Panel " ? It shows me nothing.

maryjeck avatar Apr 13 '23 08:04 maryjeck

@rchl Do you have an idea?

LDAP avatar Apr 13 '23 08:04 LDAP

@rchl Do you have an idea?

It seams the wrong with lsp. the lsp can,t find path of pip or python in the msys2 .

图片

The lsp search "pip" in the path like "Scripts" ,but msys2 haven,t that path.

Can we set the ruff-lsp path in the config?

maryjeck avatar Apr 13 '23 09:04 maryjeck

We can probably adjust the logic so that it works with msys2 also. Maybe instead of checking platform just check for existence of the directory.

Can we set the ruff-lsp path in the config?

I think you might be able to override command in LSP-ruff.sublime-settings but you'd be loosing the benefit of this package that automatically maintains the ruff server for you.

rchl avatar Apr 13 '23 09:04 rchl

// Settings in here override those in "LSP-ruff/LSP-ruff.sublime-settings"

{ "command": [ "D:\UsrCmd\msys64\ucrt64\bin\ruff-lsp.exe" ], }

I set the config like this. It also show the error

maryjeck avatar Apr 13 '23 09:04 maryjeck

More like this probably "command": ["D:\\UsrCmd\\msys64\\ucrt64\\bin\\ruff-lsp.exe"],

rchl avatar Apr 13 '23 10:04 rchl

More like this probably "command": ["D:\\UsrCmd\\msys64\\ucrt64\\bin\\ruff-lsp.exe"],

图片

sorry,this web change the context.

maryjeck avatar Apr 17 '23 01:04 maryjeck

is it fixed?

maryjeck avatar May 10 '23 05:05 maryjeck

No and I won't be looking into it myself.

I would suggest using native python instead of msysgit.

rchl avatar May 10 '23 05:05 rchl