python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.75k stars 187 forks source link

No module named 'pylsp.plugins.rope_rename' #558

Closed tianlichunhong closed 3 weeks ago

tianlichunhong commented 1 month ago

when I run spyder, have the following erro:

File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\site-packages\pylsp_jsonrpc\endpoint.py", line 117, in consume self._handle_request(message['id'], message['method'], message.get('params')) File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\site-packages\pylsp_jsonrpc\endpoint.py", line 197, in _handle_request handler_result = handler(params) ^^^^^^^^^^^^^^^ File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\site-packages\pylsp_jsonrpc\dispatchers.py", line 25, in handler return method(**(params or {})) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\site-packages\pylsp\python_lsp.py", line 326, in m_initialize self.config = config.Config( ^^^^^^^^^^^^^^ File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\site-packages\pylsp\config\config.py", line 89, in init self._pm.load_setuptools_entrypoints(PYLSP) File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\site-packages\pluggy_manager.py", line 421, in load_setuptools_entrypoints plugin = ep.load() ^^^^^^^^^ File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\site-packages\importlib_metadata__init__.py", line 184, in load module = import_module(match.group('module')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\myname\AppData\Local\Programs\Python\Python311\Lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1206, in _gcd_import File "", line 1178, in _find_and_load File "", line 1142, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'pylsp.plugins.rope_rename'

mcepl commented 3 weeks ago

https://github.com/python-rope/pylsp-rope

ccordoba12 commented 3 weeks ago

@tianlichunhong, the rope_rename internal plugin was removed and now you need to install pylsp-rope to get the same functionality.

ccordoba12 commented 3 weeks ago

Sorry, I didn't see that you're using this package with Spyder. In that case, you simply need to update it to its latest version. In other words, you need to run

pip install -U python-lsp-server