Skip to content

Language Server: Request textDocument/completion failed #2263

Closed

Description

Environment data

  • VS Code version: 1.25.1 (1.25.1)
  • Extension version (available under the Extensions sidebar): Python extension 2018.7.1 (23 July 2018)
  • OS and version: macOS High Sierra 10.13.5 (17F77)
  • Python version (& distribution if applicable, e.g. Anaconda): Python 2.7.10 64-bit
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: it's a pretty simple Django 1.7 project defined with Django>=1.7.7,<1.8

Actual behavior

When I start typing a not yet declared data attribute name let's say self.zelda immediately when I type the dot, the error is raised and keeps throwing errors with each character typed.

Expected behavior

Don't throw errors just because a data attribute (which is not-yet defined) is not found.

Steps to reproduce:

  1. When I start typing the name of a not-yet declared data attribute (e.g. self.data_attribute) in a class __init()__ method the output window pops up on each character typed which is not found and the output is like below.

Logs

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

[Info  - 10:17:35] Found 0 completions for file:///Users/(...)/Work/(...)/admin.py at (101, 17) after filtering
[Error - 10:17:38] Request textDocument/completion failed.
  Message: Object reference not set to an instance of an object.
  Code: -32000 

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

NOTHING in Dev Tools

Activity

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

    @cadl

    I meet the same issue.

    Environment data

    VS Code version: 1.25.1 (1.25.1)
    Extension version (available under the Extensions sidebar): Python extension 2018.7.1 (23 July 2018)
    OS and version: macOS High Sierra 10.13.6
    Python version (& distribution if applicable, e.g. Anaconda): Python 2.7.15
    Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda

    Logs

    [Info  - 6:03:38 PM] Found 603 completions for file:///Users/***.py at (276, 10) after filtering
    [Error - 6:03:39 PM] Request textDocument/completion failed.
      Message: Object reference not set to an instance of an object.
      Code: -32000 
    [object Object]
    
  3. patrys commented on Jul 30, 2018

    @patrys

    Duplicate of #2017?

  4. DonJayamanne commented on Jul 30, 2018

    @DonJayamanne

    ~@Fogetti cadl (@cadl) ~
    Please could you provide some sample code.

  5. added
    info-needed
    and removed on Jul 30, 2018
  6. DonJayamanne commented on Jul 30, 2018

    @DonJayamanne

    Closing in favor of #2262

  7. DonJayamanne commented on Aug 1, 2018

    @DonJayamanne

    Meant to reopen the other issue. Fixed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-intellisensebuginfo-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions