sublimelsp / LSP-ruff

LSP helper for ruff - an extremely fast Python linter, written in Rust.
https://packagecontrol.io/packages/LSP-ruff
MIT License
26 stars 4 forks source link

`Exception: ϵͳҲָ·` in install_or_update #17

Open maryjeck opened 1 year ago

maryjeck commented 1 year ago

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: ϵͳҲָ·

LDAP commented 1 year ago

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

maryjeck commented 1 year ago

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

LDAP commented 1 year ago

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

maryjeck commented 1 year ago

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

python -m venv . : it create a environment.

LDAP commented 1 year ago

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

maryjeck commented 1 year ago

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

LDAP commented 1 year ago

@rchl Do you have an idea?

maryjeck commented 1 year ago

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

rchl commented 1 year ago

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.

maryjeck commented 1 year ago

// 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

rchl commented 1 year ago

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

maryjeck commented 1 year ago

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

图片

sorry,this web change the context.

maryjeck commented 1 year ago

is it fixed?

rchl commented 1 year ago

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

I would suggest using native python instead of msysgit.