Skip to content

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

Closed

Description

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 (View→Output, 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>

Activity

  1. added
    bug
    area-intellisense
    on Jul 27, 2018
  2. patrys commented on Jul 30, 2018

    @patrys

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

  3. DonJayamanne commented on Jul 30, 2018

    @DonJayamanne

    Duplicate of #2263

  4. DonJayamanne commented on Jul 30, 2018

    @DonJayamanne

    Reopening as this contains instructions to replicate the issue.

  5. johnhany commented on Aug 5, 2018

    @johnhany
  6. DonJayamanne commented on Aug 7, 2018

    @DonJayamanne
  7. added
    important
    and removed on Aug 9, 2018
  8. MikhailArkhipov commented on Aug 10, 2018

    @MikhailArkhipov
  9. iddan commented on Sep 5, 2018

    @iddan

    When will this be released?

  10. rickstaa commented on Sep 5, 2018

    @rickstaa

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

  11. brettcannon commented on Sep 5, 2018

    @brettcannon
    Member

    Rick Staa (@rickstaa) fixed in the latest release that went out 2 hours ago.

  12. locked as resolved and limited conversation to collaborators on Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-intellisensebugimportant

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions