Skip to content

Sticky incorrect IndentationError #25179

Closed
@99991

Description

@99991

Type: Bug

Behaviour

I get sticky IndentationErrors that do not go away, even if all code in the file is deleted.

Sometimes, the hover menu for the error does not open, so it might also apply to other kinds of errors.

Image

Image

Note that there are only two lines in this file, yet the error is supposedly in line 151 or 152.

Steps to reproduce:

I could not yet find a pattern. Started happening a few weeks or maybe months ago.

Diagnostic data

Extension version: 2025.6.1
VS Code version: Code 1.101.0 (dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1, 2025-06-11T15:00:50.123Z)
OS version: Linux x64 6.8.0-60-generic snap
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.12.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Default
User Settings


venvFolders: "<placeholder>"

languageServer: "Jedi"

Installed Extensions
Extension Name Extension Id Version
code-runner for 0.12.2
copilot Git 1.335.0
copilot-chat Git 0.28.0
debugpy ms- 2025.8.0
js-debug ms- 1.100.1
js-debug-companion ms- 1.1.3
python ms- 2025.6.1
vscode-js-profile-table ms- 1.0.10
vscode-speech ms- 0.16.0
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
pythonpulldiagcf:31325931
996jf627:31283433
pythonrdcb7cf:31303019
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004
d2249276:31327029

Metadata

Metadata

Assignees

Labels

triage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions