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

Error: couldn't start client Python Tools #2877

Closed
micaelamccall opened this issue Oct 12, 2018 · 6 comments
Closed

Error: couldn't start client Python Tools #2877

micaelamccall opened this issue Oct 12, 2018 · 6 comments
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@micaelamccall
Copy link

Environment data

  • VS Code version: 1.28.1
  • Extension version (available under the Extensions sidebar): 2018.9.0
  • OS and version: macOS 10.13.6
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.0 Anaconda
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: the main Python plugin

Actual behavior

I started using VSCode a few days ago and when I fist downloaded it, it was working perfectly with the Python plugin. Then the next day when I opened VSCode, it gave me the notification "Couldn't start client Python Tools." I am unable to open a Python terminal in VSCode or run any Python code in VSCode.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Starting Microsoft Python language server.
[Error - 1:56:00 PM] Starting client failed
Error: spawn EACCES
	at _errnoException (util.js:1024:11)
	at ChildProcess.spawn (internal/child_process.js:323:11)
	at Object.exports.spawn (child_process.js:514:9)
	at _getServerWorkingDir.then.serverWorkingDir (/Users/micamccall/.vscode/extensions/ms-python.python-2018.9.0/node_modules/vscode-languageclient/lib/main.js:347:40)
	at <anonymous>

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

 INFO no standard startup: not the explorer viewlet
TMSyntax.ts:47 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///Users/micamccall/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: file:///Users/micamccall/.vscode/extensions/redhat.vscode-yaml-0.0.17/syntaxes/yaml.tmLanguage.json
e.register @ TMSyntax.ts:47
console.ts:136 [Extension Host] Python Extension: Get language server folder name, , Return Value: "languageServer.0.1.42"
console.ts:136 [Extension Host] error: Unhandled Rejection at: Promise [object Promise]. Reason: Error: spawn EACCES.
t.log @ console.ts:136
notificationsAlerts.ts:42 Couldn't start client Python Tools
t.onDidNotificationChange @ notificationsAlerts.ts:42
console.ts:136 [Extension Host] rejected promise not handled within 1 second
t.log @ console.ts:136
mainThreadExtensionService.ts:43 [ms-python.python]spawn EACCES
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:43
mainThreadExtensionService.ts:44 Error: spawn EACCES
	at _errnoException (util.js:1024:11)
	at ChildProcess.spawn (internal/child_process.js:323:11)
	at Object.exports.spawn (child_process.js:514:9)
	at _getServerWorkingDir.then.serverWorkingDir (/Users/micamccall/.vscode/extensions/ms-python.python-2018.9.0/node_modules/vscode-languageclient/lib/main.js:347:40)
	at <anonymous>
@DonJayamanne
Copy link

DonJayamanne commented Oct 12, 2018

Looks like the permissions have not been setup for execution of the language server.

  • Please could you try to manually set this up, with exec permissions 0764 for the file:
    /Users/micamccall/.vscode/extensions/ms-python.python-2018.9.0/languageServer.0.1.42/Microsoft.Python.LanguageServer

  • If that doesn't work,

    • Quit VS Code
    • Delete the languageServer.0.1.42 from the above directory.
    • Reload VS Code.
    • Ensure a python file is opened
    • Wait until the necesary files are downloaded and extracted (you should see the progress displayed on the bottom left status bar)
    • Finally, test
    • If it still fails, upload the contents of the Python Output panel and console window (as you have done earlier)

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. info-needed Issue requires more information from poster labels Oct 12, 2018
@brettcannon
Copy link
Member

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.

@m1keil
Copy link

m1keil commented Dec 8, 2018

For the sake of anyone else who might read this in the future - I had the same issue with latest VSCode and Python extension and the instructions by @DonJayamanne helped.
My VSCode was installed via brew cask so I wonder if that might be related to the problem.

@pylang
Copy link

pylang commented Dec 22, 2018

Environment data

VS Code version: 1.21.1
Extension version (available under the Extensions sidebar): 2018.4.0
OS and version: Windows 7
Python version (& distribution if applicable, e.g. Anaconda): 3.6.5 Anaconda
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: Python Extension (possible Python Extension Pack)

Expected behaviour

No errors

Actual behaviour

I have a similar error. This happened after I updated VSCode to the latest version. I decided I did not want the new version, so I uninstalled it and reinstalled the older version.

"Couldn't start client Python Tools" notif.

I had no issues prior to updating.

Steps to reproduce:

  1. Open VSCode
  2. Access a python file

Logs

Output for Python in the Output panel ...

[Error - 6:27:09 PM] Starting client failed
Launching server using command dotnet failed.

Output from Console under the Developer Tools ...

  ERR spawn dotnet ENOENT: Error: spawn dotnet ENOENT
    at exports._errnoException (util.js:1050:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
log.ts:171   ERR Cannot read property '_reject' of undefined: TypeError: Cannot read property '_reject' of undefined
    at reject (C:\Users\...\.vscode\extensions\ms-python.python-2018.4.0\out\client\common\helpers.js:38:13)
    at <anonymous>

Kudos on this template.

@DonJayamanne
Copy link

@pylang you have a very old version of the extension and vscode, please update them.

@pylang
Copy link

pylang commented Dec 23, 2018

@DonJayamanne I'd love to update mainly to test the new Jupyter features, but the new VSCode simply lags on my machine. I can hardly type a line without it hanging. Since I didn't have issues prior, I reverted. As mentioned, this issue only arose after I updated.

Thanks anyhow.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants