Home > other >  CodeOSS not running python files
CodeOSS not running python files

Time:01-11

For a few weeks now, my Code-OSS has not been running my python scripts. I am running a Garuda linux distribution and have my Code- OSS on version 1.74.2-1 and my python on version 3.10.9-1. Whenever I try to run previously working .py files or make new ones, an error pops up: "Extension activation failed, run the 'Developer: Toggle Developer Tools' command for more information." as well as showing the python extension loading indefinetly. After toggling the developer tools and trying to create a new python file, the following error is shown:

mainThreadExtensionService.ts:111 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
listWidget.ts:803 List with id 'list_id_2' was styled with a non-opaque background color. This will break sub-pixel antialiasing.
style @ listWidget.ts:803
log.ts:316   ERR command 'python.createNewFile' not found: Error: command 'python.createNewFile' not found
    at b.k (vscode-file://vscode-app/usr/lib/code/out/vs/workbench/workbench.desktop.main.js:1669:3069)
    at b.executeCommand (vscode-file://vscode-app/usr/lib/code/out/vs/workbench/workbench.desktop.main.js:1669:2985)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async vscode-file://vscode-app/usr/lib/code/out/vs/workbench/workbench.desktop.main.js:1740:4663
log.ts:316   ERR command 'python.createNewFile' not found: Error: command 'python.createNewFile' not found
    at b.k (vscode-file://vscode-app/usr/lib/code/out/vs/workbench/workbench.desktop.main.js:1669:3069)
    at b.executeCommand (vscode-file://vscode-app/usr/lib/code/out/vs/workbench/workbench.desktop.main.js:1669:2985)
    at async vscode-file://vscode-app/usr/lib/code/out/vs/workbench/workbench.desktop.main.js:1740:4663
log.ts:316   ERR command 'python.createNewFile' not found: Error: command 'python.createNewFile' not found
    at b.k (vscode-file://vscode-app/usr/lib/code/out/vs/workbench/workbench.desktop.main.js:1669:3069)
    at b.executeCommand (vscode-file://vscode-app/usr/lib/code/out/vs/workbench/workbench.desktop.main.js:1669:2985)
    at async vscode-file://vscode-app/usr/lib/code/out/vs/workbench/workbench.desktop.main.js:1740:4663

I have been struggling with this for a bit now and wanted to ask if anyone knows what to do? Thank you very much in advance and please excuse potentially bad formatting, as I do not know how to do that correctly yet.

I tried reinstalling the Code-OSS package several times, as well as reinstalling python and the extension, however none of it worked.

CodePudding user response:

try running code-OSS like this:

/usr/bin/code-oss --enable-proposed-api ms-python.python

if you're using a desktop enviroment just edit the launcher. Hope this helps

  • Related