question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pylint errors stay around after deleting code file

See original GitHub issue

Environment data

  • VS Code version: 1.21.1
  • Extension version: 2018.2.1
  • OS and version: Microsoft Windows [Version 10.0.16299.309]
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): dont know
  • Relevant/affected Python packages and their versions: pylint–version pylint 1.8.3, astroid 1.6.2 Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)]

Actual behavior

After deleting bug.py, pylint errors for bug.py stay around.

Expected behavior

After deleting bug.py, pylint errors for bug.py are discarded. (This works for .cpp files, for example.)

Steps to reproduce:

  1. Create bug.py
  2. Write anything that raises a pylint error (“bug.py” is good, yields “E0602: Undefined variable ‘bug’”)
  3. Delete bug.py

Logs

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

nothing

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

Upon deleting bug.py:


mainThreadExtensionService.ts:44 TypeError: Cannot read property 'document' of undefined
	at disposables.push.documentManager.onDidChangeActiveTextEditor (C:\Users\Username\.vscode\extensions\ms-python.python-2018.2.1\out\client\interpreter\interpreterService.js:54:91)
	at e.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:88:992)
	at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:665:650
	at e.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:88:992)
	at e.$acceptDocumentsAndEditorsDelta (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:663:757)
	at e._doInvokeHandler (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:587:832)
	at e._invokeHandler (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:587:550)
	at e._receiveRequest (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:586:658)
	at e._receiveOneMessage (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:586:427)
	at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:585:494
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:44
e._doInvokeHandler @ rpcProtocol.ts:174
e._invokeHandler @ rpcProtocol.ts:159
e._receiveRequest @ rpcProtocol.ts:108
e._receiveOneMessage @ rpcProtocol.ts:90
(anonymous) @ rpcProtocol.ts:33
(anonymous) @ rpcProtocol.ts:213
e.fire @ event.ts:142
(anonymous) @ ipc.net.ts:81
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bersbersberscommented, Jun 29, 2018
0reactions
d3r3kkcommented, Jun 29, 2018

@bersbersbers Thanks for letting us know, that’s good news!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable all Pylint warnings for a file - Stack Overflow
We have a Python package within our code base that has throwaway code, and I'd like to disable all warnings for a module...
Read more >
A curated list of pylint errors with explanation and examples
plerr. A list of pylint-errors with reasoning and examples of erroneous and correct code.
Read more >
Pylint Documentation - Read the Docs
Pylint is a tool that checks for errors in Python code, tries to enforce a coding standard and looks for code smells. It....
Read more >
Uninstall Python on Mac - Complete Removal Guide - Nektony
If you face issues when trying to uninstall Python, read a safe guide on how to uninstall Python on your Mac. To remove...
Read more >
Issues When Using auto-py-to-exe - Nitratine
This error is saying that a file you referenced does not exist. This can mean one of two things: You have not included...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found