Skip to content

Extension loading faild if Display language is not English (default) #10072

@ShenTengTu

Description

@ShenTengTu

Environment data

  • VS Code version: 1.42.0 (system setup)
  • Extension version (available under the Extensions sidebar): 2020.2.62710
  • OS and version: Windows 7
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.1
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: Chinese (Traditional) Language Pack for Visual Studio Code 1.42.2 (ms-ceintl.vscode-language-pack-zh-hant)
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): "python.jediEnabled" is True
  • Value of the python.languageServer setting: Microsoft

Expected behaviour

Extension loading successful & it can set interpreter, code IntelliSense, etc.

Actual behaviour

The extension suddenly fail to work (no IntelliSense, no Linting, etc.) when coding.
Reload or restart VSCode is still not work.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Because I use "Chinese (Traditional) Language Pack" as default, the display language in configuration is zh-tw.
  2. Open a Python file, extension does not load (no display current interpreter at left bottom).
  3. Open the Command Palette, choose "Configure Display Language" > "en"
  4. Restart VSCode.
  5. Open a Python file, the extension load successful (display current interpreter at left bottom).
  6. Open the Command Palette, choose "Configure Display Language" > "zh-tw"
  7. Restart VSCode.
  8. Open a Python file, extension does still not load.

Logs

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

[2020-02-12 18:09:20.943] [exthost] [info] ExtensionService#loadCommonJSModule file:///c:/Users/Shen-Teng Tu/.vscode/extensions/ms-python.python-2020.2.62710/out/client/extension
[2020-02-12 18:09:21.055] [exthost] [error] Activating extension ms-python.python failed due to an error:
[2020-02-12 18:09:21.062] [exthost] [error] SyntaxError: Unexpected token } in JSON at position 11319
	at JSON.parse (<anonymous>)
	at d (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:50913)
	at Object.<anonymous> (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:51265)
	at n (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:186)
	at Object.<anonymous> (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:68:13560)
	at n (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:186)
	at Object.<anonymous> (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:68:3488)
	at n (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:186)
	at Object.<anonymous> (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:855928)
	at n (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:186)
	at c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:985
	at Object.<anonymous> (c:\Users\Shen-Teng Tu\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:996)
	at Module.o._compile (c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:15:749)
	at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
	at Module.load (internal/modules/cjs/loader.js:645:32)
	at Function.Module._load (internal/modules/cjs/loader.js:560:12)
	at Function.t._load (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:837:268)
	at Function.n._load (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:807:106)
	at Function.i._load (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:803:550)
	at Module.require (internal/modules/cjs/loader.js:685:19)
	at require (internal/modules/cjs/helpers.js:16:16)
	at Function.s [as __$__nodeRequire] (c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js:32:963)
	at d._loadCommonJSModule (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:808:241)
	at d._doActivateExtension (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:708:856)
	at d._activateExtension (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:707:840)
	at Object.actualActivateExtension (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:705:796)
	at d._activateExtension (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:516:206)
	at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:515:900
	at Array.map (<anonymous>)
	at d._activateExtensions (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:515:888)
	at d.activateByEvent (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:513:635)
	at d._activateByEvent (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:706:535)
	at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:715:75

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)

/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:259 [Extension Host] [2020-02-12 18:09:10.928] [TRACE] extension - initialize
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:259 [Extension Host] [2020-02-12 18:09:10.929] [TRACE] extension - getConfiguration
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:259 [Extension Host] [2020-02-12 18:09:10.929] [DEBUG] extension - getConfiguration {  onStartup: false,  dontShowPortAlreadyInUseError: false,  port: 52698,  host: '127.0.0.1'}
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3486 啟動延伸模組 'ms-python.python' 失敗: Unexpected token } in JSON at position 11319。
_logMessageInConsole @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3486
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2720 Error: command 'python.setInterpreter' not found
    at u._tryExecuteCommand (/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3331)
    at /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3331
    at processTicksAndRejections (/C:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/workbench/internal/process/task_queues.js:89)
    at async t (/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4333)
onDidNotificationChange @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2720
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1597   ERR Failed to open: Error: Failed to open
    at WebContents.<anonymous> (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:541:522)
    at WebContents.emit (events.js:200:13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions