Skip to content

language server cannot resolve import with editable mode package #4954

Closed

Description

@crhan

Environment data

  • VS Code version: 1.32.3
  • Extension version (available under the Extensions sidebar): 2019.3.6139
  • OS and version: OSX 10.14.3
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
  • Relevant/affected Python packages and their versions: no

Expected behaviour

vscode can go to my package's definition

Actual behaviour

unresolved import 'namespaced.b'

image

Steps to reproduce:

  1. clone my example code repo, it has three package. Two with namespaced package and one with non-namespaced package: https://github.com/crhan/vscode_python_error_reproduce
  2. create a new virtualenv
  3. install these three package with: pip install package_a; pip install -e package_b; pip install -e package_c
  4. use vscode open this workspace, and choose your new virtualenv
  5. you can find the package installed with -e option cannot resolved by language server.

Logs

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

Starting Microsoft Python language server.
[Info  - 8:37:53 PM] GetCurrentSearchPaths /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python 
[Info  - 8:37:54 PM] Python search paths:
[Info  - 8:37:54 PM]     /private/var/folders/2h/z0tr49t57l7cf2j5h66dhc7c0000gn/T/rj4il50u.jpg
[Info  - 8:37:54 PM]     /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/lib/python3.7
[Info  - 8:37:54 PM]     /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/lib/python3.7/lib-dynload
[Info  - 8:37:54 PM]     /usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7
[Info  - 8:37:54 PM]     /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/lib/python3.7/site-packages
[Info  - 8:37:54 PM]     /Users/ruohan.chen/tmp/20190327/package_b
[Info  - 8:37:54 PM]     /Users/ruohan.chen/tmp/20190327/package_c
[Info  - 8:37:54 PM] Configuration search paths:
[Info  - 8:37:54 PM]     /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/lib/python37.zip
[Info  - 8:37:54 PM]     /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/lib/python3.7
[Info  - 8:37:54 PM]     /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/lib/python3.7/lib-dynload
[Info  - 8:37:54 PM]     /usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7
[Info  - 8:37:54 PM]     /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/lib/python3.7/site-packages
[Info  - 8:37:54 PM]     /Users/ruohan.chen/tmp/20190327/package_b
[Info  - 8:37:54 PM]     /Users/ruohan.chen/tmp/20190327/package_c
[Info  - 8:37:54 PM]     /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin
[Info  - 8:37:55 PM] Microsoft Python Language Server version 0.2.31.0
[Info  - 8:37:55 PM] Initializing for /Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

[Extension Host] debugger listening on port 32934
textMateService.ts:53 Overwriting grammar scope name to file mapping for scope source.python.
Old grammar file: file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/extensions/python/syntaxes/MagicPython.tmLanguage.json.
New grammar file: file:///Users/ruohan.chen/.vscode/extensions/magicstack.magicpython-1.1.0/grammars/MagicPython.tmLanguage
register @ textMateService.ts:53
textMateService.ts:53 Overwriting grammar scope name to file mapping for scope source.jinja.
Old grammar file: file:///Users/ruohan.chen/.vscode/extensions/korekontrol.saltstack-0.0.5/syntaxes/jinja.json.
New grammar file: file:///Users/ruohan.chen/.vscode/extensions/wholroyd.jinja-0.0.8/syntaxes/jinja.json
register @ textMateService.ts:53
textMateService.ts:53 Overwriting grammar scope name to file mapping for scope text.yaml.jinja.
Old grammar file: file:///Users/ruohan.chen/.vscode/extensions/korekontrol.saltstack-0.0.5/syntaxes/sls.json.
New grammar file: file:///Users/ruohan.chen/.vscode/extensions/wholroyd.jinja-0.0.8/syntaxes/jinja-yaml.json
register @ textMateService.ts:53
console.ts:134 [Extension Host] (node:67671) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:134
console.ts:134 [Extension Host] [modelines] setting editor options: {}
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Class name = p, Arg 1: {}, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Class name = p, Arg 1: {}, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Class name = p, Arg 1: {}, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Class name = p, Arg 1: {}, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Create file systemwatcher with pattern */python
console.ts:134 [Extension Host] Python Extension: Create file systemwatcher with pattern */*/python
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Class name = p, Arg 1: {}, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Class name = p, Arg 1: {}, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Class name = p, Arg 1: {}, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Register Intepreter Watcher, Class name = f, Arg 1: <Uri:/Users/ruohan.chen/tmp/20190327/test_file.py>, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Build the workspace interpreter watcher, Class name = h, Arg 1: <Uri:/Users/ruohan.chen/tmp/20190327/test_file.py>, Return Value: <Return value cannot be serialized for logging>
console.ts:134 [Extension Host] Python Extension: Detection of Python Interpreter for Command python3.6 and args  failed
console.ts:134 [Extension Host] Python Extension: Detection of Python Interpreter for Command python2 and args  failed
console.ts:134 [Extension Host] Python Extension: Rule = settings, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from settings
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, <No Resource>
console.ts:134 [Extension Host] Python Extension: Rule = workspaceEnvs, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from workspaceEnvs
console.ts:134 [Extension Host] Python Extension: Current value for rule system is {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","displayName":"Python 3.7.2 64-bit"}
console.ts:134 [Extension Host] Python Extension: Current value for rule currentPath is {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}
console.ts:134 [Extension Host] Python Extension: Current value for rule windowsRegistry is nothing
console.ts:134 [Extension Host] Python Extension: Selected Interpreter from cachedInterpreters, {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, <No Resource>
console.ts:134 [Extension Host] Python Extension: Failed to get interpreter information for '/Users/ruohan.chen/.pyenv/versions/3.6.6/bin/python' Error: spawn ELOOP
	at ChildProcess.spawn (internal/child_process.js:357:11)
	at Object.spawn (child_process.js:540:9)
	at module.exports.t.ProcessService.exec (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:9:38123)
	at f.<anonymous> (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:304634)
	at Generator.next (<anonymous>)
	at module.exports.i (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:304216)
	at new Promise (<anonymous>)
	at module.exports.i (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:303993)
	at f.getInterpreterInformation (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:304494)
	at g.<anonymous> (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:634783)
	at Generator.next (<anonymous>)
	at s (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:633169)
t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, <No Resource>
console.ts:134 [Extension Host] Python Extension: Failed to get interpreter information for '/Users/ruohan.chen/.pyenv/versions/3.6.6/bin/python3' Error: spawn ELOOP
	at ChildProcess.spawn (internal/child_process.js:357:11)
	at Object.spawn (child_process.js:540:9)
	at module.exports.t.ProcessService.exec (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:9:38123)
	at f.<anonymous> (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:304634)
	at Generator.next (<anonymous>)
	at module.exports.i (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:304216)
	at new Promise (<anonymous>)
	at module.exports.i (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:303993)
	at f.getInterpreterInformation (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:304494)
	at g.<anonymous> (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:634783)
	at Generator.next (<anonymous>)
	at s (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:633169)
t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, <No Resource>
console.ts:134 [Extension Host] Python Extension: Failed to get interpreter information for '/Users/ruohan.chen/.pyenv/versions/3.6.6/bin/python3.6' Error: spawn ELOOP
	at ChildProcess.spawn (internal/child_process.js:357:11)
	at Object.spawn (child_process.js:540:9)
	at module.exports.t.ProcessService.exec (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:9:38123)
	at f.<anonymous> (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:304634)
	at Generator.next (<anonymous>)
	at module.exports.i (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:304216)
	at new Promise (<anonymous>)
	at module.exports.i (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:303993)
	at f.getInterpreterInformation (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:304494)
	at g.<anonymous> (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:634783)
	at Generator.next (<anonymous>)
	at s (/Users/ruohan.chen/.vscode/extensions/ms-python.python-2019.3.6139/out/client/extension.js:83:633169)
t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: Interpreters returned by CondaEnvFileService are of count 0
console.ts:134 [Extension Host] Python Extension: Interpreters returned by PipEnvService are of count 0
console.ts:134 [Extension Host] Python Extension: Interpreters returned by CondaEnvService are of count 0
console.ts:134 [Extension Host] Python Extension: Interpreters returned by WorkspaceVirtualEnvService are of count 0
3console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Interpreters returned by KnownPathsService are of count 10
console.ts:134 [Extension Host] Python Extension: setGlobalInterpreter, Class name = g, Arg 1: {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}, Arg 2: <argument cannot be serialized for logging>, Return Value: true
console.ts:134 [Extension Host] Python Extension: Rule = cachedInterpreters, result = exit
3console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: <Uri:/Users/ruohan.chen/tmp/20190327>, Arg 2: <argument cannot be serialized for logging>, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Rule = windowsRegistry, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from windowsRegistry
console.ts:134 [Extension Host] Python Extension: Rule = settings, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from settings
2console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: <Uri:/Users/ruohan.chen/tmp/20190327>, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Selected Interpreter from currentPath, {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","cachedEntry":true}
console.ts:134 [Extension Host] Python Extension: Current value for rule system is {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","displayName":"Python 3.7.2 64-bit"}
console.ts:134 [Extension Host] Python Extension: Current value for rule currentPath is {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","cachedEntry":true}
console.ts:134 [Extension Host] Python Extension: Current value for rule windowsRegistry is nothing
console.ts:134 [Extension Host] Python Extension: Selected Interpreter from cachedInterpreters, {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","cachedEntry":true}
console.ts:134 [Extension Host] Python Extension: Rule = workspaceEnvs, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from workspaceEnvs
console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: <Uri:/Users/ruohan.chen/tmp/20190327>, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Get language server folder name, Class name = g, , Return Value: "languageServer.0.2.31"
console.ts:134 [Extension Host] Python Extension: Selected Interpreter from system, {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","cachedEntry":true,"displayName":"Python 3.7.2 64-bit"}
console.ts:134 [Extension Host] Python Extension: Get language server folder name, Class name = g, , Return Value: "languageServer.0.2.31"
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, /Users/ruohan.chen/tmp/20190327/test_file.py
console.ts:134 [Extension Host] Python Extension: Interpreters returned by VirtualEnvService are of count 18
3console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, <No Resource>
console.ts:134 [Extension Host] Python Extension: Get language server folder name, Class name = g, , Return Value: "languageServer.0.2.31"
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, /Users/ruohan.chen/tmp/20190327/test_file.py.git
console.ts:134 [Extension Host] Python Extension: Interpreters returned by CurrentPathService are of count 4
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: true
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: setGlobalInterpreter, Class name = g, Arg 1: {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","cachedEntry":true}, Arg 2: undefined, Return Value: false
console.ts:134 [Extension Host] Python Extension: Rule = currentPath, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from currentPath
console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: <Uri:/Users/ruohan.chen/tmp/20190327>, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, /Users/ruohan.chen/tmp/20190327/test_file.py
console.ts:134 [Extension Host] Python Extension: setGlobalInterpreter, Class name = g, Arg 1: {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","cachedEntry":true}, Arg 2: undefined, Return Value: false
console.ts:134 [Extension Host] Python Extension: Rule = cachedInterpreters, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from cachedInterpreters
console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: <Uri:/Users/ruohan.chen/tmp/20190327>, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: setGlobalInterpreter, Class name = g, Arg 1: {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","cachedEntry":true,"displayName":"Python 3.7.2 64-bit"}, Arg 2: undefined, Return Value: false
console.ts:134 [Extension Host] Python Extension: Rule = system, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from system
console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: <Uri:/Users/ruohan.chen/tmp/20190327>, Return Value: undefined
console.ts:134 [Extension Host] [modelines] could not find TextEditor
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, /Users/ruohan.chen/tmp/20190327/test_file.py
console.ts:134 [Extension Host] Python Extension: Changes in python settings detected in analysis options, Class name = v, , Return Value: undefined
log.ts:161  INFO no standard startup: not a new window
console.ts:134 [Extension Host] Python Extension: Starting Language Server, Class name = p, , Return Value: undefined
2console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, /Users/ruohan.chen/tmp/20190327/test_file.py
console.ts:134 [Extension Host] Python Extension: Rule = settings, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from settings
console.ts:134 [Extension Host] Python Extension: Rule = workspaceEnvs, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from workspaceEnvs
console.ts:134 [Extension Host] Python Extension: Current value for rule system is {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","displayName":"Python 3.7.2 64-bit"}
console.ts:134 [Extension Host] Python Extension: Current value for rule currentPath is {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}
console.ts:134 [Extension Host] Python Extension: Current value for rule windowsRegistry is nothing
console.ts:134 [Extension Host] Python Extension: Selected Interpreter from cachedInterpreters, {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}
console.ts:134 [Extension Host] Python Extension: setGlobalInterpreter, Class name = g, Arg 1: {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}, Arg 2: <argument cannot be serialized for logging>, Return Value: true
console.ts:134 [Extension Host] Python Extension: Rule = cachedInterpreters, result = exit
3console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: undefined, Arg 2: <argument cannot be serialized for logging>, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Rule = windowsRegistry, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from windowsRegistry
console.ts:134 [Extension Host] Python Extension: Rule = settings, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from settings
2console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, <No Resource>
2console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: undefined, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, <No Resource>
console.ts:134 [Extension Host] Python Extension: Selected Interpreter from currentPath, {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Class name = p, Arg 1: {}, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Create file systemwatcher with pattern */python
console.ts:134 [Extension Host] Python Extension: Create file systemwatcher with pattern */*/python
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Class name = p, Arg 1: {}, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Register Intepreter Watcher, Class name = f, Arg 1: undefined, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Build the workspace interpreter watcher, Class name = h, Arg 1: undefined, Return Value: <Return value cannot be serialized for logging>
console.ts:134 [Extension Host] Python Extension: Current value for rule system is {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","displayName":"Python 3.7.2 64-bit"}
console.ts:134 [Extension Host] Python Extension: Current value for rule currentPath is {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}
console.ts:134 [Extension Host] Python Extension: Current value for rule windowsRegistry is nothing
console.ts:134 [Extension Host] Python Extension: Selected Interpreter from cachedInterpreters, {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}
console.ts:134 [Extension Host] Python Extension: Rule = workspaceEnvs, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from workspaceEnvs
console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: undefined, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Selected Interpreter from system, {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","displayName":"Python 3.7.2 64-bit"}
2console.ts:134 [Extension Host] Python Extension: Current value for rule workspaceEnvs is {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/slb-warden-client-t3zd9uwK/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/slb-warden-client-t3zd9uwK/bin/..","fileHash":"00063cdb71a22d71872f51a059afeba457af6ade692bc80256c5e78d403d5b1e6182562a37dbd0e9714f546e1f8a3d872377e15e3c87583ef2e3324d4351c6ba","type":"PipEnv","pipEnvWorkspaceFolder":"/Users/ruohan.chen/project/slb/slb-warden-client"}
console.ts:134 [Extension Host] Python Extension: setGlobalInterpreter, Class name = g, Arg 1: {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}, Arg 2: undefined, Return Value: false
console.ts:134 [Extension Host] Python Extension: Rule = currentPath, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from currentPath
console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: undefined, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: setGlobalInterpreter, Class name = g, Arg 1: {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown"}, Arg 2: undefined, Return Value: false
console.ts:134 [Extension Host] Python Extension: Rule = cachedInterpreters, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from cachedInterpreters
console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: undefined, Return Value: undefined
console.ts:134 [Extension Host] Python Extension: Interpreters returned by PipEnvService are of count 0
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: false
console.ts:134 [Extension Host] Python Extension: Interpreters returned by WorkspaceVirtualEnvService are of count 0
console.ts:134 [Extension Host] Python Extension: setGlobalInterpreter, Class name = g, Arg 1: {"architecture":3,"path":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/python","version":{"raw":"3.7.2-final","major":3,"minor":7,"patch":2,"prerelease":["final"],"build":[],"version":"3.7.2-final"},"sysPrefix":"/Users/ruohan.chen/.local/share/virtualenvs/test_namespaced_pacakge/bin/..","fileHash":"d82b4b7ffc933ef788af18efe02ddcf91bdc8b76058226526f455501c886950a253864bbfd411b52cabefbb7fa8e755436190ade036fc0cb280c10c1a7aee7cb","type":"Unknown","displayName":"Python 3.7.2 64-bit"}, Arg 2: undefined, Return Value: false
console.ts:134 [Extension Host] Python Extension: Rule = system, result = runNextRule
console.ts:134 [Extension Host] Python Extension: Executing next rule from system
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, Class name = p, , Return Value: true
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, Class name = p, , Return Value: undefined
console.ts:134 [Extension Host] Python Extension: autoSelectInterpreter, Class name = g, Arg 1: undefined, Return Value: undefined

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Mar 27, 2019
  2. crhan commented on Mar 27, 2019

    @crhan
    Author

    PS: package installed directly(without -e option) is resolved correctly

  3. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Mar 27, 2019
  4. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Mar 27, 2019
  5. crhan commented on Mar 28, 2019

    @crhan
    Author

    should i move the issue to language server repo issue tracker?

  6. MarekOzana commented on Mar 28, 2019

    @MarekOzana

    I have exactly the same issue with conda develop packages. The issue started directly after the latest (2019.3.6139) python extension update.

  7. joel-wright commented on Apr 12, 2019

    @joel-wright

    I'm experiencing this problem as well, but I couldn't find a related open bug against the language server.

  8. added
    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.
    bugIssue identified by VS Code Team member as probable bug
    on Apr 18, 2019
  9. jakebailey commented on Jul 2, 2019

    @jakebailey
    Member

    I fixed microsoft/python-language-server#989 a few weeks ago; the editable installs were breaking due to a bug. This issue can probably be closed. (The example given here was used in my testing.) Note that the language server still needs configuration via extraPaths or PYTHONPATH to point to import roots, they aren't automatically detected.

  10. egabrum commented on Jul 2, 2019

    @egabrum

    I fixed microsoft/python-language-server#989 a few weeks ago;

    Jake Bailey (@jakebailey), I'm using languageServer.0.3.21 and my editable installs are still unresolved. I've tried adding them as "python.autoComplete.extraPaths" both in the user settings and the workspace settings.

    (On a side note, I understand that not using extrapaths is a big technical challenge, but I anticipate that requiring them is going to be a source of headaches. Jedi does not seem to require them).

    Please let us know if I am not the only one who still has these issues? Thanks.

  11. jakebailey commented on Jul 2, 2019

    @jakebailey
    Member

    I'm not sure about your specific case, I was referring to this specific issue, which was transferred to our tracker as issue 989.

    I'm assuming you're looking at microsoft/python-language-server#918, which I'm still looking into. I'd appreciate your test case there (as I had assumed by the reactions in the thread that things were fine).

    From what I've observed, Jedi has a very different import finding mechanism that ends up being much, much more loose than the stricter one used in the language server.

  12. egabrum commented on Jul 3, 2019

    @egabrum

    Jake Bailey (@jakebailey) I think I figured out what my problem was. One of the paths in my list of "python.autoComplete.extraPaths" was 1 level too high (from when I was naively trying to not have to list every single editable package path...). That seems to invalidate all the other valid paths :-( As I anticipated, this is going to be a source of pains.

    Also if, as we do, one switches back and forth between editable and non-editable installs, one has to bother to be careful about updating the extrapath. Jedi seems to resolve the installed package, the one that the interpreter will use (editable or not); but the language server will resolve whatever is in the extrapath, which might be code that actually will not run.

    Finally, when importing from a script in the same folder, I'm now forced to add the relative path (from .otherScript) where before from otherScript worked fine for both Jedi and the interpreter. The problem is that, once I switch to the relative form, pylint complains (relative-beyond-top-level). I'm not proficient on the import structure of Python, but it was nice not having linting errors for something that I have never had issues running. If I remove the . to get rid of the linting error, the language server won't resolve what I'm importing.

    Sorry if I don't illustrate this very well, but I have deadlines to meet and I can't dedicate more time to this for now.

  13. stepelu commented on Jul 31, 2019

    @stepelu

    I am getting the same error mentioned by the OP as well.
    Jake Bailey (@jakebailey) just to clarify: I am not setting any extraPaths or PYTHONPATH (as I didn't for any other package installed via pip install or conda install, and everything works fine unless the package is installed via pip install -e).
    What can I do to help debug this issue?
    Installing a module I am working on with pip install -e seems the most reasonable option to me.

  14. luabud commented on Sep 11, 2019

    @luabud
    Member

    Please try to see if this is fixed with the latest version of the Language Server. If not, please file an issue giving more information here: https://github.com/microsoft/python-language-server/issues/new/choose

  15. locked as resolved and limited conversation to collaborators on Sep 18, 2019
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 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions