【发布时间】:2023-01-11 08:47:32
【问题描述】:
几个星期以来,我的 Code-OSS 一直没有运行我的 python 脚本。我正在运行 Garuda linux 发行版,我的 Code-OSS 版本为 1.74.2-1,我的 python 版本为 3.10.9-1。每当我尝试运行以前工作的 .py 文件或创建新文件时,都会弹出一个错误:“扩展激活失败,运行‘开发人员:切换开发人员工具’命令以获取更多信息。”以及不确定地显示 python 扩展加载。切换开发人员工具并尝试创建新的 python 文件后,显示以下错误:
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
我现在一直在为此苦苦挣扎,想问问是否有人知道该怎么做?提前非常感谢您,请原谅可能出现的错误格式,因为我还不知道如何正确地做到这一点。
我多次尝试重新安装 Code-OSS 包,以及重新安装 python 和扩展,但都没有用。
【问题讨论】:
标签: python visual-studio