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: Request textDocument/completion failed #2263

Closed
ghost opened this issue Jul 27, 2018 · 6 comments
Closed

Language Server: Request textDocument/completion failed #2263

ghost opened this issue Jul 27, 2018 · 6 comments
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@ghost
Copy link

ghost commented Jul 27, 2018

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 (ViewOutput, 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

@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
@cadl
Copy link

cadl commented Jul 30, 2018

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]

@patrys
Copy link

patrys commented Jul 30, 2018

Duplicate of #2017?

@DonJayamanne
Copy link

DonJayamanne commented Jul 30, 2018

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

@DonJayamanne
Copy link

Closing in favor of #2262

@ghost
Copy link
Author

ghost commented Aug 1, 2018

@DonJayamanne Was it intentional that now both issues (this and #2262 ) are closed? I can't see either of them resolved or worked on. So basically you just simply closed both bugs, right? Am I missing something?

@DonJayamanne
Copy link

Meant to reopen the other issue. Fixed

@lock lock bot locked as resolved and limited conversation to collaborators Aug 29, 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 info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants