Repository navigation
language server cannot resolve import with editable mode package #989
Description
ruohan.chen (@crhan) commented on Wed Mar 27 2019
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'
Steps to reproduce:
- 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
- create a new virtualenv
- install these three package with:
pip install package_a; pip install -e package_b; pip install -e package_c - use vscode open this workspace, and choose your new virtualenv
- you can find the package installed with
-eoption 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
ruohan.chen (@crhan) commented on Wed Mar 27 2019
PS: package installed directly(without -e option) is resolved correctly
ruohan.chen (@crhan) commented on Wed Mar 27 2019
should i move the issue to language server repo issue tracker?
MarekOzana commented on Thu Mar 28 2019
I have exactly the same issue with conda develop packages. The issue started directly after the latest (2019.3.6139) python extension update.
Joel Wright (@joel-wright) commented on Fri Apr 12 2019
I'm experiencing this problem as well, but I couldn't find a related open bug against the language server.

Activity
chdsbd commentedon Apr 18, 2019
I just ran into this as well, here's my reproduction repository using
poetry: https://github.com/chdsbd/vscode-python-ls-reproductionEDIT: Here's a another slightly smaller repo that has the same problem with editable mode: https://github.com/chdsbd/vscode-pythonpath-reproduction
jakebailey commentedon Apr 18, 2019
Seems like we don't fully support
-e"editable" installs. In this specific screenshot, the workspace root is where we consider the import root to begin (along with search paths), so an import likenamespaced.bwon't be resolved as it's really under a different directory.chdsbd commentedon Apr 19, 2019
Not sure if it would be easy to bisect, but this used to work in previous versions.
paymog commentedon May 6, 2019
Jake Bailey (@jakebailey) do you if support for editable installs is being worked on?
paymog commentedon May 6, 2019
For what it's worth, I had this problem with PyCharm too and they have a feature to mark a directory as a
Sources Rootwhich fixed the problem for.jakebailey commentedon May 6, 2019
See also #1013, which has provided more insight.
We have a way to set roots via extraPaths (a VSC extension option) and PYTHONPATH, which should work, but is not due to configuration we're picking up as interpreter search paths due to pth files.
crhan commentedon May 17, 2019
Is there any updates? This problem bother me almost 2 month.
MikhailArkhipov commentedon May 17, 2019
Well, since item is not assigned to anyone and has no associated milestone, no immediate work is planned. If you install ZenHub Chrome/EdgeDev extension, you should be able to see our schedule and planned work.
chudytom commentedon May 29, 2019
Is it possible you could place this issue somewhere higher on the list? It would be greatly appreciated. There is a bunch of people who reported multiple issues about it: editable-installspip editable installs / setup.py develop
For now the only solution is to switch back to Jedi.
MikhailArkhipov commentedon May 29, 2019
Since there are 3 contributors (with one currently out) here we'd have to sacrifice something ;-). Although editable issue is a problem, performance with large libraries also is so it basically how many people have perf/memory issues vs editable install. #832 and #472 and #891.
OllieKampo commentedon Jun 4, 2019
Tomasz Chudzik (@chudytom) Mikhail Arkhipov (@MikhailArkhipov) Could you tell me how to "switch back to jedi"? Does this fix the issue?
jakebailey commentedon Jun 4, 2019
Set
"python.jediEnabled": true(or remove the option from your user settings, as true is the default).jakebailey commentedon Jun 7, 2019
Using the original example, this too can be fixed by configuration that points us to the different import roots:
This is the most similar to what you can do as in #989 (comment)
Perhaps we just need to make this configuration easier to work with / more visible.
However, I know that there's some oddity when this gets mixed with editable installs, which I'm going to start looking into.
jakebailey commentedon Jun 7, 2019
At the moment, our current recommendation is to use the
extraPathsconfiguration to point the LS to your import roots. See the new documentation here: https://github.com/microsoft/python-language-server/blob/master/TROUBLESHOOTING.md#unresolved-import-warningsA fix to editable installs was merged in #1183 (v0.3.1+), and will be available in the daily download channel shortly (and stable likely after). To switch to this for testing, you can set:
Inferring this information automatically is more difficult than it seems, but there is likely work that can be done on that front in the future.