Skip to content

Problems window showing "phantom" errors #3277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
darrickyee opened this issue Nov 9, 2018 · 3 comments
Closed

Problems window showing "phantom" errors #3277

darrickyee opened this issue Nov 9, 2018 · 3 comments
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug

Comments

@darrickyee
Copy link

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

@DonJayamanne
Copy link

This issue was moved to microsoft/python-language-server#386

@DonJayamanne DonJayamanne reopened this Nov 12, 2018
@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. upstream-language server labels Nov 12, 2018
@lachlan-eagling
Copy link

lachlan-eagling commented Dec 19, 2018

Also have been experiencing this.

It can be reproduced when typing within a class that extends from a class within a different file. Screenshots attached depicting this further.

  1. Type some text into subclass in different file.
    image

  2. Undo typed text, lint warning remains.
    image

@luabud
Copy link
Member

luabud commented Sep 11, 2019

Fixed upstream (microsoft/python-language-server#386)

@luabud luabud closed this as completed Sep 11, 2019
@ghost ghost removed the needs upstream fix label Sep 11, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

5 participants