Title: rename issue · Issue #694 · python-lsp/python-lsp-server · GitHub
Open Graph Title: rename issue · Issue #694 · python-lsp/python-lsp-server
X Title: rename issue · Issue #694 · python-lsp/python-lsp-server
Description: Hi, using this request, i get an empty result [] file : def hello(): print('Hello World') class MyClass: def method(self): pass def to_be_deleted(): return True file_uri: file:///E:/WORKSPACE/devagents/tests/tests/mcp_refactor_data/refac...
Open Graph Description: Hi, using this request, i get an empty result [] file : def hello(): print('Hello World') class MyClass: def method(self): pass def to_be_deleted(): return True file_uri: file:///E:/WORKSPACE/devag...
X Description: Hi, using this request, i get an empty result [] file : def hello(): print('Hello World') class MyClass: def method(self): pass def to_be_deleted(): return True file_uri: file:///E:/WORKSPA...
Opengraph URL: https://github.com/python-lsp/python-lsp-server/issues/694
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"rename issue","articleBody":"\n\nHi,\n\nusing this request, i get an empty result []\n\nfile :\n```\ndef hello():\n print('Hello World')\n\nclass MyClass:\n def method(self):\n pass\n\ndef to_be_deleted():\n return True\n```\nfile_uri: file:///E:/WORKSPACE/devagents/tests/tests/mcp_refactor_data/refactor_target.py\n\n position '{'line': 0, 'character': 0}'\n \"symbol_name\": \"hello\",\n \"new_name\": \"greetings\"\n```\n result = await self._send_request(\"textDocument/rename\", {\n \"textDocument\": {\"uri\": file_uri},\n \"position\": position,\n \"newName\": new_name\n })\n```\n\nlogging stderr, I get this : \nWARNING - pylsp.config.config - Failed to load hook pylsp_rename: There is no name under the cursor\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: Traceback (most recent call last):\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\pylsp\\config\\config.py\", line 40, in _hookexec\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: return self._inner_hookexec(hook_name, methods, kwargs, firstresult)\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\pluggy\\_manager.py\", line 475, in traced_hookexec\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: return outcome.get_result()\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: ^^^^^^^^^^^^^^^^^^^^\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\pluggy\\_result.py\", line 103, in get_result\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: raise exc.with_traceback(tb)\n2026-01-12 12:20:54,173 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\pluggy\\_result.py\", line 62, in from_call\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: result = func()\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: ^^^^^^\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\pluggy\\_manager.py\", line 472, in \u003clambda\u003e\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: lambda: oldcall(hook_name, hook_impls, caller_kwargs, firstresult)\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\pluggy\\_callers.py\", line 167, in _multicall\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: raise exception\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\pluggy\\_callers.py\", line 121, in _multicall\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: res = hook_impl.function(*args)\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: ^^^^^^^^^^^^^^^^^^^^^^^^^\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\pylsp\\plugins\\jedi_rename.py\", line 19, in pylsp_rename\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: refactoring = document.jedi_script().rename(**kwargs)\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\jedi\\api\\__init__.py\", line 592, in rename\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: return refactoring.rename(self._inference_state, definitions, new_name)\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: File \"E:\\WORKSPACE\\devagents\\.venv\\Lib\\site-packages\\jedi\\api\\refactoring\\__init__.py\", line 152, in rename\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: raise RefactoringError(\"There is no name under the cursor\")\n2026-01-12 12:20:54,174 - __main__ - INFO - LSP stderr: jedi.api.exceptions.RefactoringError: There is no name under the cursor","author":{"url":"https://github.com/sancelot","@type":"Person","name":"sancelot"},"datePublished":"2026-01-12T11:00:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/694/python-lsp-server/issues/694"}
| 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:3f97a388-787b-d4e8-27ae-bff3ee399dbb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D7C2:13D6E:173E6F4:1F2B8F3:69706A4E |
| html-safe-nonce | 751031080b07e9805c733c0dd7aab2bcca46692b716606615f5b0da9ca2a74e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0MyOjEzRDZFOjE3M0U2RjQ6MUYyQjhGMzo2OTcwNkE0RSIsInZpc2l0b3JfaWQiOiIyNTc2NzI4MTUxODYwNDU1MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e87e2a214ac1854d168e68c2849583351ca42d01df00a449dfc3eace9d01e4cc |
| hovercard-subject-tag | issue:3803803756 |
| 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/python-lsp/python-lsp-server/694/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9bdfeab003b745206ea17af0f116d9de7bfe13850cfdb00b59c21a88a55e3fd7/python-lsp/python-lsp-server/issues/694 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9bdfeab003b745206ea17af0f116d9de7bfe13850cfdb00b59c21a88a55e3fd7/python-lsp/python-lsp-server/issues/694 |
| og:image:alt | Hi, using this request, i get an empty result [] file : def hello(): print('Hello World') class MyClass: def method(self): pass def to_be_deleted(): return True file_uri: file:///E:/WORKSPACE/devag... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sancelot |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-lsp/python-lsp-server git https://github.com/python-lsp/python-lsp-server.git |
| octolytics-dimension-user_id | 51609341 |
| octolytics-dimension-user_login | python-lsp |
| octolytics-dimension-repository_id | 341006790 |
| octolytics-dimension-repository_nwo | python-lsp/python-lsp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 341006790 |
| octolytics-dimension-repository_network_root_nwo | python-lsp/python-lsp-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 | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width