Skip to content

Problems window showing "phantom" errors #3277

Closed
@darrickyee

Description

@darrickyee

Environment data

  • VS Code version: 1.28.2
  • Extension version (available under the Extensions sidebar): 2018.10.0
  • OS and version: Windows 7
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.0 (base)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A

Actual behavior

While typing a name, the Problems window raises "used before definition" warnings that do not go away when the name is completed.

error

The following actions do NOT fix this:

  • Closing and reopening the file
  • Modifying the name to something else and back again
  • Deleting the name or entire line
  • Deleting all content in the file and re-pasting

The only reliable way I have found so far to fix this is to restart VSCode.

Unlike #2290, this does NOT happen when jedi is enabled. This also does not appear to be a linter issue, as the (pylint) output does not show any of these warnings:

pylint

Can't seem to reproduce this with a toy example, but it is happening often enough in real projects that it is becoming a major usability issue. The number of "problems" explodes with phantom entries and makes the tool useless.

Expected behavior

Don't show problems in Problems window if they don't exist.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Starting Microsoft Python language server.
Microsoft Python Language Server version 0.1.60.0
Initializing for C:\Python37\python.exe
##########Linting Output - pylint##########
************* Module xml2data.elem.generic
40,4,convention,C0103:Attribute name "c" doesn't conform to snake_case naming style

------------------------------------------------------------------

Your code has been rated at 9.76/10 (previous run: 9.76/10, +0.00)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

console.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions