Title: Symbols stop being returned if filename collides with function name · Issue #481 · microsoft/python-language-server · GitHub
Open Graph Title: Symbols stop being returned if filename collides with function name · Issue #481 · microsoft/python-language-server
X Title: Symbols stop being returned if filename collides with function name · Issue #481 · microsoft/python-language-server
Description: anil (@aniljava) commented on Thu Sep 06 2018 Environment data VS Code version: 1.27.1-insider (commit: ....74cfdc) Extension version (available under the Extensions sidebar): XXX OS and version: 4.15.0-33-generic #36-Ubuntu SMP Wed Aug ...
Open Graph Description: anil (@aniljava) commented on Thu Sep 06 2018 Environment data VS Code version: 1.27.1-insider (commit: ....74cfdc) Extension version (available under the Extensions sidebar): XXX OS and version: 4...
X Description: anil (@aniljava) commented on Thu Sep 06 2018 Environment data VS Code version: 1.27.1-insider (commit: ....74cfdc) Extension version (available under the Extensions sidebar): XXX OS and version: 4...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/481
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Symbols stop being returned if filename collides with function name","articleBody":"@aniljava commented on [Thu Sep 06 2018](https://github.com/Microsoft/vscode-python/issues/2516)\n\n## Environment data\r\n\r\n- VS Code version: 1.27.1-insider (commit: ....74cfdc)\r\n- Extension version (available under the Extensions sidebar): XXX\r\n- OS and version: 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux\r\n- Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.5\r\n- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A\r\n- Relevant/affected Python packages and their versions: XXX\r\n\r\n## Actual behavior\r\n\r\nIf one of the method name in python file collides with python script file name, the intellisense stops working. Jedi works.\r\n\r\n## Expected behavior\r\n\r\nXXX\r\n\r\n## Steps to reproduce:\r\n1. On a new install, try edit ANYNAME or ANYNAME.py file and create method ANYNAME\r\n\r\n\r\nOutput from `Console` under the `Developer Tools` panel (toggle Developer Tools on under `Help`)\r\n\r\n```\r\n[Error - 6:25:59 PM] One or more errors occurred. (failed to parse file file:///xxxxxxx/test)\r\n\r\n```\r\n\r\n\n\n---\n\n@d3r3kk commented on [Tue Sep 11 2018](https://github.com/Microsoft/vscode-python/issues/2516#issuecomment-420464282)\n\nI cannot reproduce this issue on Ubuntu 18.04 on the latest extension/VSCode-Insiders/Language Server.\r\n\r\n@aniljava could you please remove your language server and try again? Perhaps we've fixed it in a newer version.\r\n\r\n1. Close all instances of VSCode-Insider.\r\n2. Remove the Python Language Server by removing the `languageServer` folder from under the extensions directory.\r\n - This is located under your user home folder, here: `~/.vscode-insider/extensions/ms-python-[version]/languageServer`\r\n3. Restart VSCode-Insiders and wait until the Python Language Server re-downloads.\r\n4. Retry your scenario.\r\n\r\n### If it still fails for you\r\n\r\nPlease send us a gif of what you are seeing, with the Terminal output window open so we can perhaps make more sense out of what is happening.\n\n---\n\n@aniljava commented on [Mon Sep 17 2018](https://github.com/Microsoft/vscode-python/issues/2516#issuecomment-422257122)\n\nFollowed the steps. \r\nENVIRNOMENT: \r\n\r\n\r\n\r\nIntellisense ; jedi disabled\r\n\r\n\r\njedi enabled in user settings (\"python.jediEnabled\": true).\r\n\r\n\n\n---\n\n@aniljava commented on [Mon Sep 17 2018](https://github.com/Microsoft/vscode-python/issues/2516#issuecomment-422258828)\n\nI realized the title is misleading, i assumed jedi turned off is intellisense in general.\r\n\r\nOnly the Code Outline feature fails only when jedi is turned off and the source file has an element (function name, top level variable name, class definition) with a name matching the file name. \n\n---\n\n@d3r3kk commented on [Thu Sep 20 2018](https://github.com/Microsoft/vscode-python/issues/2516#issuecomment-423247428)\n\nVerified on Windows 10 using VSCode 1.27.2 with python extension 2018.8.0 and the latest Python Language Server installed.\r\n\r\nCreate a new workspace, add a folder 'follow' to the workspace, and a file to the 'follow' folder called anyname.py.\r\n\r\nContent of anyname.py:\r\n```python\r\ndef anyname(name):\r\n print(f'Anyname = ''{name}''')\r\n\r\n\r\ndef some_other_name(other_name):\r\n print(other_name)\r\n\r\n\r\nanyname('Inaura')\r\nsome_other_name('Ayode')\r\n```\r\n\r\nFrom `Output -> Python` window:\r\n\r\n```\r\nStarting Microsoft Python language server.\r\nInitializing for C:\\Program Files (x86)\\Python36-32\\python.exe\r\n##########Linting Output - pylint##########\r\n\r\n--------------------------------------------------------------------\r\n\r\nYour code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)\r\n\r\n[Error - 9:21:56 AM] One or more errors occurred. (failed to parse file file:///e:/dev/github/d3r3kk/test/2516_collisions_filename_fnname/anyname.py)\r\n```\r\n\r\nFrom developer console:\r\n```\r\n/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:1411 INFO no standard startup: not a new window\r\n3/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:1411 ERR Cannot read property 'map' of null: TypeError: Cannot read property 'map' of null\r\n\tat asCompletionResult (C:\\Users\\derek\\.vscode\\extensions\\ms-python.python-2018.8.0\\node_modules\\vscode-languageclient\\lib\\protocolConverter.js:145:51)\r\n\tat \u003canonymous>\r\n```\r\n\r\nNo symbols listed at all in the `Outline` view, and no symbols listed in the breadcrumb view either.\r\n\n\n---\n\n@brettcannon commented on [Thu Sep 20 2018](https://github.com/Microsoft/vscode-python/issues/2516#issuecomment-423327764)\n\n@DonJayamanne is this our bug or something in the language server?\n\n---\n\n@BrentDickinson commented on [Mon Dec 10 2018](https://github.com/Microsoft/vscode-python/issues/2516#issuecomment-445968464)\n\nAny update on this? It also breaks Find symbol in file. Find symbol in project does seem to work though.\n\n","author":{"url":"https://github.com/brettcannon","@type":"Person","name":"brettcannon"},"datePublished":"2018-12-11T21:49:58Z","url":"https://github.com/microsoft/python-language-server/issues/481"}
| 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:db66f248-9b3e-c161-cec3-a15c9479996d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFE4:DDED5:86064E:B6A269:6AFE6F8E |
| html-safe-nonce | 24275cbd787ff93d60f2d1fef2824516d1b62f2cbb721c0b5421048e7d45d11f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkU0OkRERUQ1Ojg2MDY0RTpCNkEyNjk6NkFGRTZGOEUiLCJ2aXNpdG9yX2lkIjoiMjUwNzExNTMxODkxNzA5OTQwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6a26b0027c929bacd3cba098fc0e2f74402826b08aba6f727320b3d1ef9daf8b |
| hovercard-subject-tag | issue:389968578 |
| 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/481/issue_layout |
| twitter:image | https://opengraph.githubassets.com/21611db17c75300446c8df02b63c0ed6b0754d19b29afcb6fa0b48e857f7cbf9/microsoft/python-language-server/issues/481 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/21611db17c75300446c8df02b63c0ed6b0754d19b29afcb6fa0b48e857f7cbf9/microsoft/python-language-server/issues/481 |
| og:image:alt | anil (@aniljava) commented on Thu Sep 06 2018 Environment data VS Code version: 1.27.1-insider (commit: ....74cfdc) Extension version (available under the Extensions sidebar): XXX OS and version: 4... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brettcannon |
| 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