Skip to content

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

Closed

Description

@python4ever

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?

Activity

  1. changed the title [-]Intellisense doesn't work[/-] [+]Intellisense for site-packages doesn't work as intended[/+] on Feb 7, 2018
  2. kjgfcdb commented on Feb 8, 2018

    @kjgfcdb

    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?

  3. DonJayamanne commented on Feb 26, 2018

    @DonJayamanne

    @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).

    Chen Dengbo (@kjgfcdb) Please could you too install the Insiders build of the extension.

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

  4. kjgfcdb commented on Feb 27, 2018

    @kjgfcdb

    Don Jayamanne (@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.
  5. brettcannon commented on Mar 1, 2018

    @brettcannon
    Member

    @frynio I unfortunately can't directly reproduce:

    example

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

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

  6. 3 remaining items

  7. DonJayamanne commented on Mar 20, 2018

    @DonJayamanne

    Chen Dengbo (@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))
  8. kjgfcdb commented on Mar 21, 2018

    @kjgfcdb

    Don Jayamanne (@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.

  9. brettcannon commented on Apr 3, 2018

    @brettcannon
    Member

    I still can't reproduce, even with from numpy import *. Chen Dengbo (@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.

  10. julKali commented on Apr 6, 2018

    @julKali

    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

  11. brettcannon commented on May 7, 2018

    @brettcannon
    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.

  12. locked as resolved and limited conversation to collaborators on Jul 11, 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-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions