Title: Unresolved import problem for files in sub-directories in a workspace · Issue #1099 · microsoft/python-language-server · GitHub
Open Graph Title: Unresolved import problem for files in sub-directories in a workspace · Issue #1099 · microsoft/python-language-server
X Title: Unresolved import problem for files in sub-directories in a workspace · Issue #1099 · microsoft/python-language-server
Description: Its hard for me to explain my exact issue because I don't know all the correct terminology. Basically if I try to import one of my own python files into another of my own python files whilst both are in the same "sub-directory" of my "ma...
Open Graph Description: Its hard for me to explain my exact issue because I don't know all the correct terminology. Basically if I try to import one of my own python files into another of my own python files whilst both a...
X Description: Its hard for me to explain my exact issue because I don't know all the correct terminology. Basically if I try to import one of my own python files into another of my own python files whilst bo...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/1099
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unresolved import problem for files in sub-directories in a workspace","articleBody":"Its hard for me to explain my exact issue because I don't know all the correct terminology.\r\nBasically if I try to import one of my own python files into another of my own python files whilst both are in the same \"sub-directory\" of my \"main\" workspace directory then I get an unresolved import problem unless I put the full file path from the \"main\" directory into the import in which case the python files no longer run.\r\nPlease see my example below.\r\n\r\nSay I have files setup like this: (I've obviously omitted folders and files you don't need to see)\r\n\r\n```\r\nC:.\r\n│ Potassco.code-workspace\r\n│\r\n├───.vscode\r\n│ settings.json\r\n│\r\n└───Work\r\n └───Hospitality_Domain\r\n └───Version_7\r\n │ Architecture.lp\r\n │ domain_setup.lp\r\n │ Parser.py\r\n │ Robot_Hotel.sp\r\n │ Simulate.py\r\n │ SPARC.jar\r\n │\r\n └───__pycache__\r\n Parser.cpython-36.pyc\r\n```\r\n\r\nIf I try to import Parser.py into Simulate.py as such:\r\n`import Parser`\r\nI get the unresolved import problem but the code runs just fine (as we would expect).\r\n\r\nHowever if I instead put this:\r\n`import Work.Hospitality_Domain.Version_7.Parser`\r\nI do not get the unresolved import but the code does not run, (which is also what I would expect).\r\n\r\nI'm guessing my problem is probably something simple, can anyone help?","author":{"url":"https://github.com/OllieKampo","@type":"Person","name":"OllieKampo"},"datePublished":"2019-05-18T14:57:19Z","url":"https://github.com/microsoft/python-language-server/issues/1099"}
| 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:40f73d66-53d2-1787-d89e-a2218f4347be |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AD46:247139:6EA434:96C4C1:6AFE6864 |
| html-safe-nonce | 88fcdfdeeabddab566c6f098dc3c2ae10f09bbe6dc63385bf4e259a59f674b34 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDQ2OjI0NzEzOTo2RUE0MzQ6OTZDNEMxOjZBRkU2ODY0IiwidmlzaXRvcl9pZCI6IjQzMDI0NDM3NjY0MTA1MzcwNjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a9b6564122f56313e7d3872cda21aaafe82f99cdf3518afd3ca3b6245706d855 |
| hovercard-subject-tag | issue:445723580 |
| 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/1099/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d53633bedb2f591448b5cd66b88f4597cbe79e2fb98795e5975c69a3b776984b/microsoft/python-language-server/issues/1099 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d53633bedb2f591448b5cd66b88f4597cbe79e2fb98795e5975c69a3b776984b/microsoft/python-language-server/issues/1099 |
| og:image:alt | Its hard for me to explain my exact issue because I don't know all the correct terminology. Basically if I try to import one of my own python files into another of my own python files whilst both a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | OllieKampo |
| 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