Title: This "unresolved import" warning is displayed when using the "Microsoft" language service. · Issue #2118 · microsoft/python-language-server · GitHub
Open Graph Title: This "unresolved import" warning is displayed when using the "Microsoft" language service. · Issue #2118 · microsoft/python-language-server
X Title: This "unresolved import" warning is displayed when using the "Microsoft" language service. · Issue #2118 · microsoft/python-language-server
Description: Environment data VS Code version: 1.48.2 (user setup) Extension version (available under the Extensions sidebar): 2020.8.106424 OS and version: Windows_NT x64 10.0.18362 Python version (& distribution if applicable, e.g. Anaconda): 3.8.3...
Open Graph Description: Environment data VS Code version: 1.48.2 (user setup) Extension version (available under the Extensions sidebar): 2020.8.106424 OS and version: Windows_NT x64 10.0.18362 Python version (& distribut...
X Description: Environment data VS Code version: 1.48.2 (user setup) Extension version (available under the Extensions sidebar): 2020.8.106424 OS and version: Windows_NT x64 10.0.18362 Python version (& distr...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/2118
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"This \"unresolved import\" warning is displayed when using the \"Microsoft\" language service.","articleBody":"\u003c!-- Please search existing issues to avoid creating duplicates. --\u003e\r\n\r\n## Environment data\r\n\r\n- VS Code version: 1.48.2 (user setup)\r\n\r\n- Extension version (available under the Extensions sidebar): 2020.8.106424\r\n- OS and version: Windows_NT x64 10.0.18362\r\n- Python version (\u0026 distribution if applicable, e.g. Anaconda): 3.8.3 from Anaconda/python3.8.3\r\n- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv | conda\r\n- Relevant/affected Python packages and their versions: N/A\r\n- Relevant/affected Python-related VS Code extensions and their versions: Pylance 2020.8.3\r\n- Value of the `python.languageServer` setting: \"python.languageServer\": \"Microsoft\",\r\n\r\n[**NOTE**: If you suspect that your issue is related to the Microsoft Python Language Server (`python.languageServer: 'Microsoft'`), please download our new language server [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance) from the VS Code marketplace to see if that fixes your issue]\r\n\r\n## Expected behaviour\r\n\r\nWhen using the \"Microsoft\" language service, VSCode does not display this \"unresolved import\" warning.\r\n\r\n## Actual behaviour\r\n\r\nWhen using the \"Microsoft\" language service, VSCode displays this \"unresolved import\" warning.\r\n\r\n## Steps to reproduce:\r\n\r\n[**NOTE**: Self-contained, minimal reproducing code samples are **extremely** helpful and will expedite addressing your issue]\r\n\r\n1. In the same parent folder, import the class of the \"b.py\" file in the \"a.py\" file. \r\n2. When using the \"Microsoft\" language service, VSCode displays this \"unresolved import\" warning.\r\n3. When using \"Pylance\" or \"Jedi\" language services, VSCode does not display this \"unresolved import\" warning.\r\n4. When using \"Microsoft\" language service, and set \"python.analysis.disabled\": [\r\n \"unresolved-import\"\r\n ], VSCode does not display this \"unresolved import\" warning.\r\n\r\nIs it possible to prevent VSCode from displaying this warning like \"Pylance\" and \"Jedi\" without setting it?\r\n\r\n\r\n\u003c!--\r\nNote: If you think a GIF of what is happening would be helpful, consider tools like https://www.cockos.com/licecap/, https://github.com/phw/peek or https://www.screentogif.com/ .\r\n--\u003e\r\n\r\n## Logs\r\n\r\n\u003cdetails\u003e\r\nUser belongs to experiment group 'AlwaysDisplayTestExplorer - experiment'\r\nUser belongs to experiment group 'ShowPlayIcon - start'\r\nUser belongs to experiment group 'DebugAdapterFactory - experiment'\r\nUser belongs to experiment group 'PtvsdWheels37 - experiment'\r\nUser belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'\r\nUser belongs to experiment group 'LocalZMQKernel - experiment'\r\nUser belongs to experiment group 'CollectLSRequestTiming - control'\r\nUser belongs to experiment group 'CollectNodeLSRequestTiming - experiment'\r\nUser belongs to experiment group 'EnableIPyWidgets - experiment'\r\nUser belongs to experiment group 'DeprecatePythonPath - experiment'\r\nUser belongs to experiment group 'RunByLine - control'\r\nUser belongs to experiment group 'CustomEditorSupport - control'\r\nUser belongs to experiment group 'pythonaacf'\r\n\u003e conda --version\r\n\u003e pyenv root\r\n\u003e python3.7 c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\n\u003e python3.6 c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\n\u003e python3 c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\n\u003e python2 c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\n\u003e python c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\n\u003e py -3.7 c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\n\u003e py -3.6 c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\n\u003e py -3 c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\n\u003e py -2 c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\n\u003e D:\\Users\\...\\Anaconda3\\envs\\jhgjghjgLine\\python.exe c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py -c \"import sys;print(sys.executable)\"\r\nError 2020-09-09 16:22:20: Detection of Python Interpreter for Command python3 and args failed as file does not exist\r\nPython interpreter path: D:\\Users\\...\\AppData\\Local\\Programs\\Python\\Python38\\python.exe\r\nStarting Microsoft Python language server.\r\n\u003e conda info --json\r\n\u003e conda info --json\r\n\u003e conda info --json\r\n\u003e conda env list\r\nError 2020-09-09 16:22:20: Detection of Python Interpreter for Command py and args -2 failed as file Python 2 not found!\r\n\r\n -3.8-64\r\n -3.7-64\r\n -3.5-64 does not exist\r\nError 2020-09-09 16:22:20: Detection of Python Interpreter for Command py and args -3.6 failed as file Python 3.6 not found!\r\n\r\n -3.8-64\r\n -3.7-64\r\n -3.5-64 does not exist\r\nError 2020-09-09 16:22:20: Failed to download and store experiments, Class name = b, completed in 1822ms, has a falsy return value, , Return Value: undefined [Error: Failed with status 404, Not Found, Uri https://raw.githubusercontent.com/microsoft/vscode-python/master/experiments.json\r\n\tat H._callback (c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\out\\client\\extension.js:54:713175)\r\n\tat H.a._callback.a.callback.a.callback (c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\out\\client\\node_modules\\request.js:189:5442)\r\n\tat H.emit (events.js:203:13)\r\n\tat H.\u003canonymous\u003e (c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\out\\client\\node_modules\\request.js:189:18302)\r\n\tat H.emit (events.js:203:13)\r\n\tat IncomingMessage.\u003canonymous\u003e (c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\out\\client\\node_modules\\request.js:189:17134)\r\n\tat Object.onceWrapper (events.js:291:20)\r\n\tat IncomingMessage.emit (events.js:208:15)\r\n\tat endReadableNT (_stream_readable.js:1168:12)\r\n\tat processTicksAndRejections (internal/process/task_queues.js:77:11)]\r\nError 2020-09-09 16:22:20: Failed to initialize experiments, Class name = b, completed in 1835ms, has a falsy return value, , Return Value: undefined [Error: Failed with status 404, Not Found, Uri https://raw.githubusercontent.com/microsoft/vscode-python/master/experiments.json\r\n\tat H._callback (c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\out\\client\\extension.js:54:713175)\r\n\tat H.a._callback.a.callback.a.callback (c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\out\\client\\node_modules\\request.js:189:5442)\r\n\tat H.emit (events.js:203:13)\r\n\tat H.\u003canonymous\u003e (c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\out\\client\\node_modules\\request.js:189:18302)\r\n\tat H.emit (events.js:203:13)\r\n\tat IncomingMessage.\u003canonymous\u003e (c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\out\\client\\node_modules\\request.js:189:17134)\r\n\tat Object.onceWrapper (events.js:291:20)\r\n\tat IncomingMessage.emit (events.js:208:15)\r\n\tat endReadableNT (_stream_readable.js:1168:12)\r\n\tat processTicksAndRejections (internal/process/task_queues.js:77:11)]\r\nError 2020-09-09 16:22:20: Failed to get interpreter information for 'C:\\Users\\...\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe' [Error: Command failed: \"C:\\\\Users\\...\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe\" \"c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py\" \"c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\interpreterInfo.py\"\r\nPython was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640\r\n\tat ChildProcess.exithandler (child_process.js:308:12)\r\n\tat ChildProcess.emit (events.js:203:13)\r\n\tat maybeClose (internal/child_process.js:1021:16)\r\n\tat Socket.\u003canonymous\u003e (internal/child_process.js:430:11)\r\n\tat Socket.emit (events.js:203:13)\r\n\tat Pipe.\u003canonymous\u003e (net.js:588:12)] {\r\n killed: false,\r\n code: 9009,\r\n signal: null,\r\n cmd: '\"C:\\\\\\\\Users\\\\...\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps\\\\python.exe\" \"c:\\\\Users\\\\...\\\\.vscode\\\\extensions\\\\ms-python.python-2020.8.106424\\\\pythonFiles\\\\pyvsc-run-isolated.py\" \"c:\\\\Users\\\\...\\\\.vscode\\\\extensions\\\\ms-python.python-2020.8.106424\\\\pythonFiles\\\\interpreterInfo.py\"'\r\n}\r\nError 2020-09-09 16:22:20: Failed to get interpreter information for 'C:\\Users\\...\\AppData\\Local\\Microsoft\\WindowsApps\\python3.exe' [Error: Command failed: \"C:\\\\Users\\...\\AppData\\Local\\Microsoft\\WindowsApps\\python3.exe\" \"c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\pyvsc-run-isolated.py\" \"c:\\Users\\...\\.vscode\\extensions\\ms-python.python-2020.8.106424\\pythonFiles\\interpreterInfo.py\"\r\nPython was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640\r\n\tat ChildProcess.exithandler (child_process.js:308:12)\r\n\tat ChildProcess.emit (events.js:203:13)\r\n\tat maybeClose (internal/child_process.js:1021:16)\r\n\tat Socket.\u003canonymous\u003e (internal/child_process.js:430:11)\r\n\tat Socket.emit (events.js:203:13)\r\n\tat Pipe.\u003canonymous\u003e (net.js:588:12)] {\r\n killed: false,\r\n code: 9009,\r\n signal: null,\r\n cmd: '\"C:\\\\\\\\Users\\\\...\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps\\\\python3.exe\" \"c:\\\\Users\\\\...\\\\.vscode\\\\extensions\\\\ms-python.python-2020.8.106424\\\\pythonFiles\\\\pyvsc-run-isolated.py\" \"c:\\\\Users\\\\...\\\\.vscode\\\\extensions\\\\ms-python.python-2020.8.106424\\\\pythonFiles\\\\interpreterInfo.py\"'\r\n}\r\n\u003e conda env list\r\n\r\n\u003c/details\u003e\r\n","author":{"url":"https://github.com/Jill-Cheng","@type":"Person","name":"Jill-Cheng"},"datePublished":"2020-09-09T08:29:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2118/python-language-server/issues/2118"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a4a36f3a-aa4e-7a1d-fc89-9aa8b367d958 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A18:8CD9D:720113:9B12E7:6A4DD256 |
| html-safe-nonce | b99c943fd5dacad23209cef032fd84efa345f0828abb1d9e5896abbdef28a256 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTE4OjhDRDlEOjcyMDExMzo5QjEyRTc6NkE0REQyNTYiLCJ2aXNpdG9yX2lkIjoiODgwODYwNTA3MTE3ODU4NDY2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2101b5acc0b3c52d1ee9d857ce71e37bd05c2a1c6b802ab7660d75c4117aa049 |
| hovercard-subject-tag | issue:697001833 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/python-language-server/2118/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ddcec4a37b31fbad35ecd2334ef385ccc96abd17ae457700608dec5b483f906b/microsoft/python-language-server/issues/2118 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ddcec4a37b31fbad35ecd2334ef385ccc96abd17ae457700608dec5b483f906b/microsoft/python-language-server/issues/2118 |
| og:image:alt | Environment data VS Code version: 1.48.2 (user setup) Extension version (available under the Extensions sidebar): 2020.8.106424 OS and version: Windows_NT x64 10.0.18362 Python version (& distribut... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Jill-Cheng |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 145901977 |
| octolytics-dimension-repository_nwo | microsoft/python-language-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145901977 |
| octolytics-dimension-repository_network_root_nwo | microsoft/python-language-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width