You are not logged in.

#1 2023-01-03 11:56:10

newsboost
Member
Registered: 2016-07-24
Posts: 157

[SOLVED] VS Code, after upgrading: Python extension fails to load...?

Hi all,

I've updated my "community/code"-package and I think something has changed in the past around 2 weeks, over the christmas holiday: Suddenly I cannot debug my python-scripts any-more... The error message is: "Couldn't find a debug adapter descriptor for debug type 'python' (extension might have failed to activate)".

I have had around 2 weeks of vacation and on 2 work machines, both running Arch Linux. Because it's the same behavior on both machines, I'm pretty sure the reason is that vs-code upgraded something and there's an issue with how Arch Linux does something... I just don't know what the problem is. I've obviously tried to google for the error message, but that leads to a lot of irrelevant posts so it seems the error message can appear in (probably) many different situations. How do I narrow down the issue and understand what I should do to fix it? In the lower right corner, I get the advice that I should activate the "Developer Tools: Toggle Developer Tools"-command - but that does not help me, because I don't know how to debug loading the Python-extension... So what now? My VS Code details are (fully-uptodate-arch linux):

Version: 1.74.2
Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161
Date: 2022-12-21T11:41:53.444Z
Electron: 19.1.9
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 6.1.2-arch1-1
Sandboxed: No

I don't see a way to upload screenshots, but please see the screenshot here: https://ibb.co/mBcS1cH - thanks for any help/advice!

UPDATE: I found https://github.com/microsoft/vscode-python/issues/15445 and now understand that I should use the CONSOLE-stuff from Help > Toggle Developer Tools. This reveals:

*** Extension activation failed, run the 'Developer: Toggle Developer Tools' command for more information.
c	@	notificationsAlerts.ts:42

*** Activating extension 'ms-python.python' failed: Extension 'ms-python.python' CANNOT use API proposal: telemetryLogger.
Its package.json#enabledApiProposals-property declares:  but NOT telemetryLogger.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-python.python.
$onExtensionActivationError	@	mainThreadExtensionService.ts:111

*** Cannot activate the 'isort' extension because its dependency 'Python' failed to activate

So it's something to do with this "API proposal: telemetryLogger", which lead me to this ticket: https://github.com/microsoft/vscode-python/issues/20247 - I did try to switch between both release and pre-release versions of the python-extension, but that didn't work... So I haven't found a solution yet, except maybe this is more suitable for creating a ticket for vscode-python... hmm...

UPDATE #2: I think I found a work-around: I just have to start vs code like this (taken from the logging-view):

code --enable-proposed-api ms-python.python & disown

I don't think this is really a good solution or work-around - namely because I don't understand what it does... If anyone know anything about this, please let me know...

Last edited by newsboost (2023-01-06 10:54:34)

Offline

#2 2023-01-05 19:41:10

xerxes_
Member
Registered: 2018-04-29
Posts: 676

Re: [SOLVED] VS Code, after upgrading: Python extension fails to load...?

Something about it:
https://code.visualstudio.com/api/advan … oposed-api
https://wiki.archlinux.org/title/Visual_Studio_Code and search on site for "proposed"
You can do alias for "code --enable-proposed-api ms-python.python" if it works and you don't want to install anything more for code.

Offline

#3 2023-01-05 22:46:05

newsboost
Member
Registered: 2016-07-24
Posts: 157

Re: [SOLVED] VS Code, after upgrading: Python extension fails to load...?

@xerxes_: Oh, thanks a lot. I didn't understand all of this, suddenly VS code seems very complicated. But as I understand it, I should just install code-features / https://aur.archlinux.org/packages/code-features, because a user a few weeks ago wrote:

I've only needed to install this now with the upgrade to vscode v1.74 because of the python extension issue.

- This sounds *VERY* promising and sounds exactly like a solution to my problem.

UPDATE: Thanks a lot @xerxes_: You did lead me on the right track and I think the problem is now solved in the best way. For the reference, the solution is to install code-features - or maybe the "-insiders"-version, which I however didn't try:

aur/code-features-insiders 1.74.0-1 (+10 0.04)
    Unblock some features in Code OSS, including features in VSCode Insiders
aur/code-features 1.74.0-1 (+40 4.09) (Installed)
    Unblock some features in Code OSS

Marking as [SOLVED] now, this I think is the correct solution on Arch Linux!

Last edited by newsboost (2023-01-06 10:56:02)

Offline

#4 2023-02-14 12:36:50

Joancf
Member
Registered: 2023-02-14
Posts: 1

Re: [SOLVED] VS Code, after upgrading: Python extension fails to load...?

@newsboost , how did you install the  code-features? i
Thanks!
Joan

Offline

#5 2023-07-22 00:58:11

kandr3lly
Member
Registered: 2023-02-16
Posts: 6

Re: [SOLVED] VS Code, after upgrading: Python extension fails to load...?

Very late to the party.

Code-features is an AUR package. I quick google search of "arch linux how install AUR package" should point you in the right direction, but it boils down to this:

1) Checkout this repo: https://aur.archlinux.org/packages/code-features

2) Cd into the repo root and run "makepkg -si"

3) Follow the prompts on screen

You'll need packages such as git, fakeroot, and others that I don't remember off the top of my head, but the internet is full of answers on that question.

Hope this helps! Thanks again for solving this issue for me as well peeps.

Offline

Board footer

Powered by FluxBB