Title: Unresolved Import · Issue #5563 · microsoft/vscode-python · GitHub
Open Graph Title: Unresolved Import · Issue #5563 · microsoft/vscode-python
X Title: Unresolved Import · Issue #5563 · microsoft/vscode-python
Description: Environment data VS Code version: 1.33.1 Extension version (available under the Extensions sidebar): 2019.4.12954 OS and version: Windows_NT x64 10.0.17134 Python version (& distribution if applicable, e.g. Anaconda): 2.7.11 64-bit Expec...
Open Graph Description: Environment data VS Code version: 1.33.1 Extension version (available under the Extensions sidebar): 2019.4.12954 OS and version: Windows_NT x64 10.0.17134 Python version (& distribution if applica...
X Description: Environment data VS Code version: 1.33.1 Extension version (available under the Extensions sidebar): 2019.4.12954 OS and version: Windows_NT x64 10.0.17134 Python version (& distribution if app...
Opengraph URL: https://github.com/microsoft/vscode-python/issues/5563
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unresolved Import","articleBody":"## Environment data\r\n\r\n- VS Code version: 1.33.1\r\n- Extension version (available under the Extensions sidebar): 2019.4.12954\r\n- OS and version: Windows_NT x64 10.0.17134\r\n- Python version (& distribution if applicable, e.g. Anaconda): 2.7.11 64-bit\r\n\r\n## Expected behaviour\r\n\r\nWith `python.autoComplete.extraPaths` set correctly, modules should import without issue.\r\n\r\n## Actual behaviour\r\n\r\nI receive a `Unresolved import 'moduleName'` when using syntax of the form\r\n`import workspace_folder.module as alt_name`\r\n_and_ if the .code-workspace file is in the same directory.\r\ne.g.\r\n\r\n\r\n## Steps to reproduce:\r\n1. Extract the following to a suitable location:\r\n[myLib.zip](https://github.com/Microsoft/vscode-python/files/3148114/myLib.zip)\r\n2. Inside myLib, open the Import_Bug.code-workspace file\r\n3. Go to workspace settings and change the `python.autoComplete.extraPaths` to the folder containing myLib.\r\n4. open libFunctions.py and see that `import myLib.importMe as im` has an unresolved import error.\r\n\r\nI am aware that the organization of this workspace is sub-optimal, with the code-workspace file being inside the python library folder. However, with all paths being set correctly, the import should still succeed.\r\n\r\n## Logs\r\nOutput for `Python` in the `Output` panel (`View`→`Output`, change the drop-down the upper-right of the `Output` panel to `Python`)\r\n\r\nBlank.\r\n\r\nOutput 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`)\r\n\r\nBlank.\r\n","author":{"url":"https://github.com/Anti-Distinctlyminty","@type":"Person","name":"Anti-Distinctlyminty"},"datePublished":"2019-05-06T13:37:42Z","url":"https://github.com/microsoft/vscode-python/issues/5563"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:7356f60f-0f0a-dc97-061b-ca49da138c09 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5B8:3786C9:2D7E45:3B5056:6AFE5C18 |
| html-safe-nonce | 0059d03cfce7ce5a02ae4ed529eb37d750dad533511cf05034dd52fecdc7bce1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUI4OjM3ODZDOToyRDdFNDU6M0I1MDU2OjZBRkU1QzE4IiwidmlzaXRvcl9pZCI6IjM1OTQzODQwNTY1MTY1MDA1MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ffb90c43f31fc0cc280e05ef1440618309ba8faed0aa1fa1382cd6f1d906b8d0 |
| hovercard-subject-tag | issue:440704182 |
| 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/vscode-python/5563/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a53ca1a34c4f68d9e6f0f390c3731d80de47552ddcfbf8198d8de4b8f6116467/microsoft/vscode-python/issues/5563 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a53ca1a34c4f68d9e6f0f390c3731d80de47552ddcfbf8198d8de4b8f6116467/microsoft/vscode-python/issues/5563 |
| og:image:alt | Environment data VS Code version: 1.33.1 Extension version (available under the Extensions sidebar): 2019.4.12954 OS and version: Windows_NT x64 10.0.17134 Python version (& distribution if applica... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Anti-Distinctlyminty |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/vscode-python git https://github.com/microsoft/vscode-python.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 106462765 |
| octolytics-dimension-repository_nwo | microsoft/vscode-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 49946255 |
| octolytics-dimension-repository_parent_nwo | DonJayamanne/pythonVSCode |
| octolytics-dimension-repository_network_root_id | 49946255 |
| octolytics-dimension-repository_network_root_nwo | DonJayamanne/pythonVSCode |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width