Skip to content

error squiggle lines not showing for Python files #9657

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
hackasaur opened this issue Jan 18, 2020 · 5 comments
Closed

error squiggle lines not showing for Python files #9657

hackasaur opened this issue Jan 18, 2020 · 5 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@hackasaur
Copy link

hackasaur commented Jan 18, 2020

Environment data

  • VS Code version: 1.41.1
  • Extension version (available under the Extensions sidebar):
  • OS and version: 2020.1.58038
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.9
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): not using
  • Relevant/affected Python packages and their versions: doesn't matter
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): true

Expected behaviour

underlining error squiggle lines show for errors in python files.

Actual behaviour

no error squiggle lines showing. seems as if pylint is not working

Steps to reproduce:

error squiggle lines stopped coming. I don't know what i did maybe after installing anaconda but i have uninstalled it now and the issue still persists.

here is a link to the same problem I asked on stackoverflow(it has images and other system data):
sameIssueOnStackoverflow

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 'AlwaysDisplayTestExplorer - control'
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - enabled'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'AA_testing - 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)"
> /usr/bin/python3.8 -c "import sys;print(sys.executable)"
> conda info --json
> conda env list
Starting Microsoft Python language server.
> conda --version
> /usr/bin/python3.8 ~/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/interpreterInfo.py
> /usr/bin/python3.8 ~/.vscode/extensions/ms-python.python-2020.1.58038/pythonFiles/interpreterInfo.py

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) only the errors

console.ts:137 [Extension Host] Error Python Extension: 2020-01-18 18:35:53: Failed to serialize gatherRules for DATASCIENCE.SETTINGS [TypeError: Cannot convert object to primitive value  at Array.join (<anonymous>) at Array.toString (<anonymous>) at /home/manik/.vscode/extensions/ms-python.python-2020.1.58038/out/client/extension.js:1:12901 at Array.forEach (<anonymous>)  at Object.l [as sendTelemetryEvent] (/home/manik/.vscode/extensions/ms-python.python-2020.1.58038/out/client/extension.js:1:12818)  at C.sendSettingsTelemetry (/home/manik/.vscode/extensions/ms-python.python-2020.1.58038/out/client/extension.js:75:707093) at C.r.value (/home/manik/.vscode/extensions/ms-python.python-2020.1.58038/out/client/extension.js:1:87512) at Timeout._onTimeout (/home/manik/.vscode/extensions/ms-python.python-2020.1.58038/out/client/extension.js:1:86031)    at listOnTimeout (internal/timers.js:531:17)    at processTimers (internal/timers.js:475:7)]
t.log @ console.ts:137
2console.ts:137 [Extension Host] Notification handler 'textDocument/publishDiagnostics' failed with message: Cannot read property 'connected' of undefined
t.log @ console.ts:137
2console.ts:137 [Extension Host] (node:21707) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:398
_invokeHandler @ rpcProtocol.ts:383
_receiveRequest @ rpcProtocol.ts:299
_receiveOneMessage @ rpcProtocol.ts:226
(anonymous) @ rpcProtocol.ts:101
fire @ event.ts:581
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:581
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:200
addChunk @ _stream_readable.js:294
readableAddChunk @ _stream_readable.js:275
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
@hackasaur hackasaur added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Jan 18, 2020
@ghost
Copy link

ghost commented Jan 18, 2020

In your workspace directory, .vscode > settings.json, declare

"python.linting.pylintEnabled": True
"python.jediEnabled": False

Duplicate of #9637 , #9649

Bug also affected #9577

Similar to: microsoft/python-language-server#1868

Relevant to #7314

Possible cause #7314 (comment)

@hackasaur
Copy link
Author

hackasaur commented Jan 18, 2020

In your workspace directory, .vscode > settings.json, declare

"python.pylintEnabled": True
"python.jediEnabled": False

Duplicate of #9637 , #9649

Bug also affected #9577

Relevant to #7314

Possible cause #7314 (comment)

thanks, your solution worked but it is python.linting.pylintEnabled. I added it to the code's .config directory's setting.json file now error squiggle lines are working globally. I don't understand what caused the problem though.

@ghost
Copy link

ghost commented Jan 18, 2020

In latest version, workspace is not registering settings from checkboxes so you have to explicitly declare in settings.json what settings you want to enable for your workspace. Flake8 is not affected by this. Pylint and Microsoft Python Language Server seem to be not working due to this.

@Phi-Li
Copy link

Phi-Li commented Jan 20, 2020

In your workspace directory, .vscode > settings.json, declare

"python.linting.pylintEnabled": True
"python.jediEnabled": False

Duplicate of #9637 , #9649

Bug also affected #9577

Similar to: microsoft/python-language-server#1868

Relevant to #7314

Possible cause #7314 (comment)

Not work for me. Even with these lines in workspace settings the current linting setting showed in command palette is still "off". Switch to Jedi and everything is back to normal.

VS Code :
Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T15:04:31.999Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 5.4.0-2-amd64

Python extension version: 2020.1.58038
IntelliCode extension version: 1.2.4

@brettcannon
Copy link
Member

Duplicate of #9649.

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jan 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants