vscode-python: Extension doesn't load

Environment data

  • VS Code version: 1.33.1
  • Extension version (available under the Extensions sidebar): 2019.4.11881
  • OS and version: 5.0.7-1-MANJARO
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
  • Relevant/affected Python packages and their versions: N/A

Expected behaviour

VS Code loading the extension

Actual behaviour

VS Code doesn’t load the extension

Steps to reproduce:

  1. Install newest version (2019.4.11881)
  2. Restart VS Code

Logs

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

N/A

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

extensionHost.ts:311 [Extension Host] debugger listening on port 26793
extensionService.ts:802 Couldn't find message for key python.snippet.launch.unitTests.description.
_logMessageInConsole @ extensionService.ts:802
extensionService.ts:800 Activating extension 'ms-python.python' failed: Unexpected token } in JSON at position 2364.
_logMessageInConsole @ extensionService.ts:800
console.ts:134 [Extension Host] Activating extension `ms-python.python` failed:  Unexpected token } in JSON at position 2364
t.log @ console.ts:134
console.ts:134 [Extension Host] Here is the error stack:  SyntaxError: Unexpected token } in JSON at position 2364
	at JSON.parse (<anonymous>)
	at d (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:1:39446)
	at Object.module.exports.Object.defineProperty.value (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:1:39801)
	at n (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:1:279)
	at Object.module.exports.r.__decorate.o (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:24:39416)
	at n (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:1:279)
	at Object.module.exports.r.__decorate.o (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:24:36365)
	at n (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:1:279)
	at Object.<anonymous> (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:9:89881)
	at n (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:1:279)
	at module.exports.Object.defineProperty.value (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:1:1078)
	at Object.<anonymous> (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:1:1089)
	at Object.<anonymous> (/home/mkx/.vscode/extensions/ms-python.python-2019.4.11881/out/client/extension.js:85:3)
	at Module.t._initNodeRequire.r._compile (/opt/visual-studio-code/resources/app/out/vs/loader.js:16:90)
	at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
	at Module.load (internal/modules/cjs/loader.js:620:32)
	at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
	at Function.Module._load (internal/modules/cjs/loader.js:551:3)
	at Function.t._load (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:729:537)
	at Function.t.getExtensionPathIndex.then.a._load (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:691:639)
	at Function.t.getExtensionPathIndex.then.r._load (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:655:197)
	at Module.require (internal/modules/cjs/loader.js:658:17)
	at require (internal/modules/cjs/helpers.js:20:18)
	at Function.i [as __$__nodeRequire] (/opt/visual-studio-code/resources/app/out/vs/loader.js:31:542)
	at /opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:717:918
	at E._doActivateExtension (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:718:2)
	at E._activateExtension (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:716:772)
	at E.<anonymous> (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:714:224)
	at Generator.next (<anonymous>)
	at n (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:11:176)
	at new Promise (<anonymous>)
	at n (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:10:975)
	at Object.actualActivateExtension (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:713:946)
	at p._activateExtension (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:457:765)
	at define._activateExtensions.i.length.Promise.all.o.map.e (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:457:449)
	at Array.map (<anonymous>)
	at p._activateExtensions (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:457:437)
	at p.activateByEvent (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:455:375)
	at E._activateByEvent (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:715:434)
	at define.$activateByEvent._readyToRunExtensions.wait.then.t (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:723:359)
console.ts:134 [Extension Host] [vscode-icons] v8.6.0 activated!
notificationsAlerts.ts:38 Error: command 'python.setInterpreter' not found
    at Proxy._tryExecuteCommand (commandService.ts:60)
    at r.then.i (commandService.ts:53)
    at process._tickCallback (internal/process/next_tick.js:68)
onDidNotificationChange @ notificationsAlerts.ts:38



About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 10
  • Comments: 33

Commits related to this issue

Most upvoted comments

I remove last extra comma from “C:\Users[username].vscode\extensions\ms-python.python-2019.4.11881\package.nls.[language].json.” and restart vs code. it works. I’m using Japanese.

also similar issue too. i fix this to early extension version, i think this problem on new extension version, maybe wait someone fix this bug. and dont forgot close auto update on vs code.

Hi everyone, we’ll be landing a fix for this issue ASAP. Apologies for the inconvenience caused.

should I switch to pycharm or sublime? work is stopped…

You can right-click the Python extension in the extension tab and select a different version to install

I remove last extra comma from “C:\Users[username].vscode\extensions\ms-python.python-2019.4.11881\package.nls.[language].json.” and restart vs code. it works. I’m using Japanese.

For Chinese users, delete the last comma in the zh-cn json file, and it should work. This is a bit awkward.

Come on, please fix this asap!

I even reinstalled VSCode, then I found this issue.

I remove last extra comma from “C:\Users[username].vscode\extensions\ms-python.python-2019.4.11881\package.nls.[language].json.” and restart vs code. it works. I’m using Japanese.

For Chinese users, delete the last comma in the zh-cn json file, and it should work. This is a bit awkward.

nice. It works

I face the same issue on my mac with

OS version: Mojava 10.14.4 VS code 1.33.1 Extension version: 2019.4.11881

should I switch to pycharm or sublime? work is stopped…