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.

Language server doesnt lint errors

See original GitHub issue

Environment data

  • VS Code version: 1.41
  • Extension version (available under the Extensions sidebar): 2020.1.58038
  • OS and version: Ubuntu 19.10
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.8.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
  • Relevant/affected Python packages and their versions: All in general
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Jedi=false Python Language Server=0.5.10.0

Expected behaviour

Error highlighting works

Actual behaviour

Error highlighting works

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Open a python file and type something that is not right, eg test
  2. Observe the laguage server not working

Logs

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

User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
User belongs to experiment group 'DebugAdapterFactory - experiment'
> conda --version
> pyenv root
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> ~/coding/python/hikari/.venv/bin/python -c "import sys;print(sys.executable)"
> conda info --json
Starting Microsoft Python language server.
> conda --version

Language Server Output:

[Info  - 6:36:28 PM] Analysis cache path: /home/davfsa/snap/code/common/.cache/Microsoft/Python Language Server
[Info  - 6:36:28 PM] Microsoft Python Language Server version 0.5.10.0
[Info  - 6:36:28 PM] Workspace root: /home/davfsa/coding/python/hikari
[Info  - 6:36:28 PM] GetCurrentSearchPaths /home/davfsa/coding/python/hikari/.venv/bin/python 
[Info  - 6:36:28 PM] Interpreter search paths:
[Info  - 6:36:28 PM]     /home/davfsa/coding/python/hikari/.venv/lib/python3.8
[Info  - 6:36:28 PM]     /home/davfsa/coding/python/hikari/.venv/lib/python3.8/lib-dynload
[Info  - 6:36:28 PM]     /usr/lib/python3.8
[Info  - 6:36:28 PM]     /home/davfsa/coding/python/hikari/.venv/lib/python3.8/site-packages
[Info  - 6:36:28 PM] User search paths:
[Info  - 6:36:29 PM] Initializing for /home/davfsa/coding/python/hikari/.venv/bin/python
[Info  - 6:36:29 PM] Analysis caching mode: None.

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

Noticed this 2 errors:

Notification handler 'textDocument/publishDiagnostics' failed with message: Cannot read property 'connected' of undefined

(node:6100) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

If any further info is needed, please dont hesitate to ask

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ericloewecommented, Jan 16, 2020

@davfsa Reverting to 2019.11.50794 works around this.

1reaction
davfsacommented, Jan 16, 2020

@sys-temd im not looking to use a linter like pylint or flake8 (since i dont want to save all the time to check the linting). I want the language server to automatically do the linting like it did in Windows

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code Language Server Linting Incorrect - Stack Overflow
VS Code (and in particular the MS Python Language Server) shows lot's of unnecessary errors. These appear as it lints while I type, ......
Read more >
Linting Python in Visual Studio Code
Linting is thus distinct from Formatting because linting analyzes how the code runs and detects errors whereas formatting only restructures how code appears....
Read more >
eslint language server added to nvim-lspconfig : r/neovim
After all eslint is already available with null-ls (or lint/format plugin, as formatter for example), so why would I use one LS more...
Read more >
Language Server Protocol Specification - 3.17
This document describes the 3.17.x version of the language server protocol. ... It doesn't denote a real error code. No LSP error codes...
Read more >
Using eslint language server as a formatter (fix all eslint errors)
Does anyone have the eslint language server working to fix all errors on format? settings = { validate = 'on', packageManager = 'npm',...
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