skip to Main Content

The Python extension is failing to load for me. I noticed it was updated earlier this morning and I haven’t changed my VS Code configuration or added any new extensions. Any suggestions?

Here is the output of the extension:

[ERROR 2023-1-6 11:16:39.302]: extension activation failed [TypeError: Expected a string, got undefined
    at e.exports (c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:1980955)
    at b (c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:138478)
    at y.update (c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:133796)
    at y.initialize (c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:137868)
    at new y (c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:128788)
    at y.getInstance (c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:129446)
    at h.getSettings (c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:140722)
    at c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:409217
    at async t.activateComponents (c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:408578)
    at async c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:3124940
    at async e (c:Userstmorg.vscodeextensionsms-python.python-2023.2.0outclientextension.js:2:3124490)
    at async f.n (c:UserstmorgAppDataLocalProgramsMicrosoft VS CoderesourcesappoutvsworkbenchapinodeextensionHostProcess.js:94:6818)
    at async f.m (c:UserstmorgAppDataLocalProgramsMicrosoft VS CoderesourcesappoutvsworkbenchapinodeextensionHostProcess.js:94:6781)
    at async f.l (c:UserstmorgAppDataLocalProgramsMicrosoft VS CoderesourcesappoutvsworkbenchapinodeextensionHostProcess.js:94:6238)]

enter image description here

2

Answers


  1. I had the same issue (at least it seemed the same), however it is possible to work around it if you are using the Python extension in conjunction with Remote Debugging.

    You can ignore the extension’s activation failure if that is your primary use, since VSCode is still able to debug remotely using Python Remote Attach.


    After some more work on this, I found that updating the Python Extension to the pre-release version cleared up the various errors that came with the recent updates.

    Login or Signup to reply.
  2. You could roll back to the historical version in the extension store to solve this problem.

    If you want, you can also follow this issue on github, it’s the same problem.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search