Title: Python unresolved import issue · Issue #1137 · microsoft/python-language-server · GitHub
Open Graph Title: Python unresolved import issue · Issue #1137 · microsoft/python-language-server
X Title: Python unresolved import issue · Issue #1137 · microsoft/python-language-server
Description: Tomasz Chudzik (@chudytom) commented on Sun May 26 2019 Environment data VS Code version: 1.34.0 Extension version (available under the Extensions sidebar): 2019.4.12954 OS and version: Windows 10 v. 1809 Python version (& distribution i...
Open Graph Description: Tomasz Chudzik (@chudytom) commented on Sun May 26 2019 Environment data VS Code version: 1.34.0 Extension version (available under the Extensions sidebar): 2019.4.12954 OS and version: Windows 10 ...
X Description: Tomasz Chudzik (@chudytom) commented on Sun May 26 2019 Environment data VS Code version: 1.34.0 Extension version (available under the Extensions sidebar): 2019.4.12954 OS and version: Windows 10 ...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/1137
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python unresolved import issue","articleBody":"@chudytom commented on [Sun May 26 2019](https://github.com/microsoft/vscode-python/issues/5786)\n\n\u003c!-- \r\nDo you have a question instead of a bug report or enhancement request? Please ask it on https://stackoverflow.com/questions/tagged/visual-studio-code+python. \r\n\r\nUnable to install a linter or formatter? 'No installers available'? \r\nWindows - https://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows\r\nLinux - https://www.cyberciti.biz/faq/debian-ubuntu-centos-rhel-linux-install-pipclient/ , https://www.tecmint.com/install-pip-in-linux/\r\n\r\nPython configuration issues? Please check https://code.visualstudio.com/docs/python/python-tutorial#_prerequisites\r\n\r\nOtherwise **please** fill in the requested details below. \"XXX\" markers should not be present in the final bug report.\r\n\r\nIf 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-->\r\n\r\n## Environment data\r\n\r\n- VS Code version: 1.34.0\r\n- Extension version (available under the Extensions sidebar): 2019.4.12954\r\n- OS and version: Windows 10 v. 1809\r\n- Python version (& distribution if applicable, e.g. Anaconda): 3.5.2 64-bit without Conda\r\n- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): I guess I have no venv set up. \r\n- Relevant/affected Python packages and their versions: Microsoft Python Language Server v. 0.2.86\r\n\r\n## Actual behaviour\r\n\r\nI open VSCode in a root folder where all my code exists. Part of it looks like this:\r\n\r\n* workspaceRootFolder\r\n * .vscode\r\n * network\r\n * section_network_input.py\r\n * timepredictionslib\r\n * build\r\n * dist\r\n * timepredictionslib\r\n * Here in subfolders are all my classes in the module\r\n * .env\r\n\r\nIn the 'network' folder I have some script that I run straight from PowerShell whereas in 'timepredictionslib' I have my custom module where I store all reuasuable classes.\r\n\r\n All code runs smooth when run by the Python interpreter, however when I disabled Jedi and switched to Microsoft Python Language Server I get the 'unresolved import' error\r\n\r\n\r\nI already added the '.env' file with the following content: \r\nPYTHONPATH=timepredictionslib\r\n\r\nand added the file as python.envFile as was advised here: \r\nhttps://github.com/Microsoft/vscode-python/issues/3840#issuecomment-463789294\r\n\r\nAlso I added python.autoComplete.extraPaths as was proposed here: \r\nhttps://github.com/microsoft/python-language-server/issues/1099\r\n\r\nBut none of these helped. Do you guys have any idea what else I need to do for the Lanugage Server to discover my library?\r\n\r\nOne more thing. When I tried to update the first import presented in the attached screen it is then discovered by the Language Server and IntelliSense but not by Pylint and the Python interpreter: \r\n\r\n\r\n## Steps to reproduce:\r\nIf needed I will create a smaller project with similiar configuration and push it to GutHub.\r\n\r\n## Logs\r\nOutput for `Python` in the `Output` panel\r\n\r\n\r\n## settings.json for Python\r\n\r\n\n\n","author":{"url":"https://github.com/DonJayamanne","@type":"Person","name":"DonJayamanne"},"datePublished":"2019-05-28T17:50:16Z","url":"https://github.com/microsoft/python-language-server/issues/1137"}
| 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:6f741f63-ed38-37c2-9efe-2b8a35c83acf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE24:2826BD:56EAF2:71B3A7:6AFE686D |
| html-safe-nonce | bbd357ef9f7112e6123bbd5f27e6da27f87f7d74e328d23b4b95dd829921c924 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTI0OjI4MjZCRDo1NkVBRjI6NzFCM0E3OjZBRkU2ODZEIiwidmlzaXRvcl9pZCI6IjM2NDI3ODYzNzUxNDIzNjkzODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0237fe41d80fc59c3f896b2674d8c07540fb94e45df0a3db0eb31a95d8de8ba8 |
| hovercard-subject-tag | issue:449398760 |
| 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/1137/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6381b79f6ad7b56098a39cde83e6308be651de90fd2f43755f7f1835905f6180/microsoft/python-language-server/issues/1137 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6381b79f6ad7b56098a39cde83e6308be651de90fd2f43755f7f1835905f6180/microsoft/python-language-server/issues/1137 |
| og:image:alt | Tomasz Chudzik (@chudytom) commented on Sun May 26 2019 Environment data VS Code version: 1.34.0 Extension version (available under the Extensions sidebar): 2019.4.12954 OS and version: Windows 10 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DonJayamanne |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width