Skip to content
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

Setting python.analysis.nodeExecutable in the user settings affects how pylance gets launched on VSCode remote #5812

Open
fsouza opened this issue Apr 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@fsouza
Copy link

fsouza commented Apr 26, 2024

Opening as a question because I'm not sure if I'm doing something wrong or not. I sometimes use VSCode locally, and other times I use it remote (different use cases). The problem is that when I set python.analysis.nodeExecutable in the user settings, pylance tries to use that path on the remote server, despite the user settings graying out the setting, which implies that it shouldn't be used on remote?

For example, assuming I set python.analysis.nodeExecutable to /opt/homebrew/opt/node@20/bin/node on macOS, and then try to connect to a remote, Pylance fails to start with the error message:

2024-04-26 19:26:48.835 [info] (Client) Pylance async client (2024.4.1) started with python extension (2024.4.1)
2024-04-26 19:26:48.856 [info] [Error - 7:26:48 PM] Pylance client: couldn't create connection to server.
2024-04-26 19:26:48.856 [info] Launching server using command /opt/homebrew/opt/node@20/bin/node failed. Error: spawn /opt/homebrew/opt/node@20/bin/node ENOENT

If I open the user settings, python.analysis.nodeExecutable is grayed out with a message that reads "This setting cannot be applied in this window. It will be applied when you open a local window.", which is a bit confusing. Screenshot:

image

Is that the expected behavior or am I doing something wrong?

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Apr 26, 2024
@heejaechang
Copy link
Contributor

heejaechang commented Apr 26, 2024

ah, sounds like a bug. we should ignore this when it is used in remote. putting it in triage so we can determine when we should fix this.

@heejaechang heejaechang added the bug Something isn't working label Apr 26, 2024
@judej judej assigned judej and KacieKK and unassigned KacieKK and judej Apr 30, 2024
@rchiodo
Copy link
Contributor

rchiodo commented May 7, 2024

On the remote machine you should be using the machine wide settings.json. For me that's somewhere like so:

/home/user/.vscode-server/Machine/settings.json

This settings.json should take precedence over the user settings.json.

I think the bug here is we're picking up the local setting if the remote setting isn't set.

@KacieKK KacieKK removed the needs repro Issue has not been reproduced yet label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants