Skip to content
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

Language server opens Output panel on its own during certain syntax errors #2262

Closed
supposedly opened this issue Jul 26, 2018 · 9 comments
Closed
Assignees
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority
Milestone

Comments

@supposedly
Copy link

Environment data

  • VS Code version: 1.25.1
  • Extension version (available under the Extensions sidebar): 2018.7.1
  • OS and version: Ubuntu 18.04
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.5 64-bit
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A

Actual behavior

The Output panel (ctrl+K ctrl+H) opens automatically when typing as it detects certain syntax errors.

Expected behavior

For the panel not to butt in uninvited 😛

Steps to reproduce

This has happened organically in a lot of different places where I haven't paid attention to the output, but here's a reproducible case:

  1. Save an empty file with the .py extension in VSCode.
  2. Type the following into it:
class Error(Exception):
    pass

try:
    pass
except Error as e:
    e
  1. With your cursor after the final e, type a dot (.).
  2. The Output panel will open with the below output. This does not occur when a built-in exception class or any other object is substituted for Error in the except ... line, nor does it occur when Error doesn't inherit (directly or not) from BaseException.

Logs

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

The below text is duplicated (with a different timestamp, of course) for every character typed after the dot.

[Error - 4:29:32 PM] Request textDocument/completion failed.
  Message: Object reference not set to an instance of an object.
  Code: -32000 
[object Object]

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

No identifiable console output results from the steps above. There is the following, but it appears immediately before typing the colon in except Exception as e: and not on the line causing the main error's problem.

log.ts:171   ERR Cannot read property 'map' of null: TypeError: Cannot read property 'map' of null
    at asCompletionResult (~/.vscode/extensions/ms-python.python-2018.7.1/node_modules/vscode-languageclient/lib/protocolConverter.js:145:50)
    at <anonymous>
@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. needs verification labels Jul 27, 2018
@patrys
Copy link

patrys commented Jul 30, 2018

Possibly related: #2017 (although it's for Python 2.7)

@DonJayamanne
Copy link

Duplicate of #2263

@DonJayamanne
Copy link

Reopening as this contains instructions to replicate the issue.

@johnhany

This comment has been minimized.

@DonJayamanne

This comment has been minimized.

@MikhailArkhipov MikhailArkhipov added important Issue identified as high-priority and removed P0 labels Aug 9, 2018
@MikhailArkhipov MikhailArkhipov self-assigned this Aug 9, 2018
@MikhailArkhipov
Copy link

microsoft/PTVS#4623

@iddan
Copy link

iddan commented Sep 5, 2018

When will this be released?

@rickstaa
Copy link

rickstaa commented Sep 5, 2018

I still have this problem is it supposed to be fixed?

@brettcannon
Copy link
Member

@rickstaa fixed in the latest release that went out 2 hours ago.

@microsoft microsoft locked as resolved and limited conversation to collaborators Sep 5, 2018
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 important Issue identified as high-priority
Projects
None yet
Development

No branches or pull requests

8 participants