Skip to content

Microsoft Python Language Server fails to provide completions for an extension module #2466

Closed
@segevfiner

Description

@segevfiner

Environment data

  • VS Code version: 1.26.1
  • Extension version (available under the Extensions sidebar): 2018.7.1
  • OS and version: Windows 10.0.17134.228 x64
  • Python version (& distribution if applicable, e.g. Anaconda): CPython 3.7.0 x64
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A

Actual behavior

Completion for the locally in-place built _hello extension module doesn't work. It shows the following warning:

Unable to resolve '_hello'. IntelliSense may be missing for this module.

Found in #2458 (comment)

Expected behavior

Completions should work.

Steps to reproduce:

  1. Download: hello_mod.zip
  2. Build it in-place: python setup.py build_ext --inplace (setuptools required)
  3. Open hello.py.

Logs

Output for Python in the Output panel:

Starting Microsoft Python language server.
[Info  - 9:12:56 PM] Created Microsoft.PythonTools.Interpreter.Ast.AstPythonInterpreter instance from Microsoft.PythonTools.Interpreter.Ast.AstPythonInterpreterFactory
Initializing for C:\Users\Segev\AppData\Local\Programs\Python\Python37\python.exe
Loading files from c:\Users\Segev\prj\hello_mod
##########Linting Output - flake8##########
1,1,F,F401:'_hello.hello' imported but unused

cc @brettcannon

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-editor-*User-facing catch-allarea-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions