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

Intellisense for site-packages doesn't work as intended #720

Closed
python4ever opened this issue Feb 7, 2018 · 11 comments
Closed

Intellisense for site-packages doesn't work as intended #720

python4ever opened this issue Feb 7, 2018 · 11 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

@python4ever
Copy link

python4ever commented Feb 7, 2018

Environment data

VS Code version: Newest
Python Extension version: 2018.1.0
Python Version: 3.6.4
OS and version: Windows 10 x64

Actual behavior

Intellisense does not work, sometimes partially work I guess

Expected behavior

Well I guess it should work all the time

Steps to reproduce:

  • I opened a project dir in vs code
  • I write a code like this:

image

  • It doesn't even suggest train_data or anything. The pop-up showed up, because after writing a dot I pressed Ctrl+Space

It works good for my own classe (if I make some dummy class Foo then it shows available methods after the dot). It may sometimes show up but like after 5-10 seconds? I guess thats too much and I remember working with this extension without that trouble. It does something like this:

Alt Text

I tried it on multiple machines (with Linux too), fresh installations, new files/folders, nothing does work. My settings.json:

{
    "editor.renderWhitespace": "all",
    "window.zoomLevel": 0,
    "vim.disableExtension": false,
    // Python setting
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/*.pyc": true,
        "**/*.idea": true,
        "**/*.cache": true,
        "**/*__pycache__": true
    },
    "workbench.editor.enablePreview": false,
    "editor.formatOnSave": true,
    "editor.formatOnPaste": true,
    "sync.autoDownload": true,
    "sync.autoUpload": true,
    "sync.forceDownload": false,
    "sync.anonymousGist": false,
    "sync.host": "",
    "sync.pathPrefix": "",
    "sync.quietSync": false,
    "sync.askGistName": false,
    "gitlens.advanced.messages": {
        "suppressCommitHasNoPreviousCommitWarning": false,
        "suppressCommitNotFoundWarning": false,
        "suppressFileNotUnderSourceControlWarning": false,
        "suppressGitVersionWarning": false,
        "suppressLineUncommittedWarning": false,
        "suppressNoRepositoryWarning": false,
        "suppressResultsExplorerNotice": false,
        "suppressUpdateNotice": false,
        "suppressWelcomeNotice": true
    },
    "window.menuBarVisibility": "default",
    "vim.otherModesKeyBindings": [
        {
            "before": [
                "^"
            ],
            "after": [
                "z",
                "z"
            ]
        }
    ],
}

Am I doing something wrong?

@python4ever python4ever changed the title Intellisense doesn't work Intellisense for site-packages doesn't work as intended Feb 7, 2018
@kjgfcdb
Copy link

kjgfcdb commented Feb 8, 2018

Same problem encountered.

VS Code version: 1.20.0
Python Extension version: 2018.1.0
Python Version: 3.6.4
OS and version: Windows 10 x64

Intelligence for function open does not work.

gif

And this is what developer's tool shows
gif1

Is this the problem of my network?

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. awaiting 1-verification labels Feb 12, 2018
@DonJayamanne DonJayamanne self-assigned this Feb 26, 2018
@DonJayamanne
Copy link

DonJayamanne commented Feb 26, 2018

@frynio

  • What is the python interperter is used by VS Code?
    The Python version will be displayed on the bottom left of the VS Code status bar.
    Please check the tooltip to identify the path of the python interpreter.
  • Confirm pandas is installed in the Python interpreter used by VS Code (see above)
  • Finally, please test this the Insiders Build of our extension.
    We've fixed a number of issues related to intellisense and its possible this too has been resolved in the dev version (to be released within a week or so).

@kjgfcdb Please could you too install the Insiders build of the extension.

NOTE: I'm not referring to the Insiders Build of VS Code.

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster and removed needs verification labels Feb 26, 2018
@DonJayamanne DonJayamanne removed their assignment Feb 26, 2018
@kjgfcdb
Copy link

kjgfcdb commented Feb 27, 2018

@DonJayamanne Unfortunately the Insiders build of the extension still fails to fix this problem, here is the screen shot.
qq 20180227102300

Interpreter:
python 3.5.2 (downloaded from python.org)

This problem occurs when I import the numpy library and type "np.". Then the intellisense crashes and error message appears in developer's tool again and again.

import numpy as np
np.

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels Feb 27, 2018
@brettcannon
Copy link
Member

@frynio I unfortunately can't directly reproduce:

example

I did have to wait for the Jedi cache to warm up, though.

@kjgfcdb What version of NumPy are you running? For me on CPython 3.6.3 and numpy 1.14.1 I am getting intellisense.

@DonJayamanne
Copy link

@kjgfcdb
Please could you provide the information requested above, also please could you download and install the latest Insider Build of the extension. It contains a fix for one of the errors reported above.

@kjgfcdb
Copy link

kjgfcdb commented Mar 3, 2018

@brettcannon The NumPy that I am running is numpy 1.14.1.
@DonJayamanne The latest version of this extension still failed to fix this problem. And this time the error becomes this:
_20180303151156

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels Mar 5, 2018
@DonJayamanne
Copy link

@kjgfcdb
Please could you try the following:

  • pip install jedi
  • Then execute the following code:
import jedi
source = """
import numpy as np
np.
"""

script = jedi.Script(source=source, line=3, column=3, path='one.py')
completions = script.completions()
print(len(completions))

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster and removed needs verification labels Mar 20, 2018
@kjgfcdb
Copy link

kjgfcdb commented Mar 21, 2018

@DonJayamanne OK, the output is 912, and it seems that this problem only occurs when I use numpy. For other packages like jedi,matplotlib and so on, the intelligence works very well.

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels Mar 21, 2018
@brettcannon
Copy link
Member

I still can't reproduce, even with from numpy import *. @kjgfcdb do you have any sample code you can provide which consistently triggers this? Otherwise you can wait until our experimental analysis engine becomes available.

@brettcannon brettcannon added the info-needed Issue requires more information from poster label Apr 3, 2018
@julKali
Copy link

julKali commented Apr 6, 2018

I can confirm this bug. For me it's not only numpy but also scipy and matplotlib (these are the ones I tested).

See this issue: microsoft/vscode#47360

@brettcannon
Copy link
Member

Closing due to lack of response for more info. If the info is provided in the future we will be happy to re-open this.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 11, 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

5 participants