Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP-ruff not working in MacOS - No module named 'lsp_utils' #38

Closed
jlariza opened this issue Oct 17, 2023 · 10 comments
Closed

LSP-ruff not working in MacOS - No module named 'lsp_utils' #38

jlariza opened this issue Oct 17, 2023 · 10 comments

Comments

@jlariza
Copy link

jlariza commented Oct 17, 2023

Good day,

I installed LSP-ruff package in sublime. However, it did nothing. When I checked the sublime console, It shows this errors:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 308, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1692, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/<user>/Library/Application Support/Sublime Text/Installed Packages/LSP-ruff.sublime-package/plugin.py", line 1, in <module>
ImportError: No module named 'lsp_utils'

...

plugins loaded
Package Control: The library "lsp_utils" is not available for Python 3.3

Seems that lsp_utils is not being loaded with the default python version used by sublime packages (3.3). How may I configure it to use the version it requires? What am I missing to make LSP-ruff work?

Thank you,

@rchl
Copy link
Member

rchl commented Oct 17, 2023

Caused by sublimelsp/repository#86.
Should resolve itself in 2, 3 hours.

@rchl rchl closed this as completed Oct 17, 2023
@jlariza
Copy link
Author

jlariza commented Oct 17, 2023

@rchl it is now showing a different error:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 308, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1692, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/<user>/Library/Application Support/Sublime Text/Installed Packages/LSP-ruff.sublime-package/plugin.py", line 1, in <module>
  File "/Users/<user>/Library/Application Support/Sublime Text/Lib/python33/lsp_utils/__init__.py", line 6, in <module>
    from .generic_client_handler import GenericClientHandler
  File "/Users/<user>/Library/Application Support/Sublime Text/Lib/python33/lsp_utils/generic_client_handler.py", line 9, in <module>
    from package_control import events  # type: ignore
ImportError: cannot import name events

@rchl
Copy link
Member

rchl commented Oct 17, 2023

Try running Package Control: Satisfy dependencies from the Command Palette

@jlariza
Copy link
Author

jlariza commented Oct 17, 2023

@rchl did not work. The problem persists

@rchl
Copy link
Member

rchl commented Oct 17, 2023

Try removing LSP-ruff and re-installing again.
Also try to restart ST after of course.

@jlariza
Copy link
Author

jlariza commented Oct 19, 2023

@rchl no luck. Problem persists

@rchl
Copy link
Member

rchl commented Oct 19, 2023

Can you show the listing of your /Users/<user>/Library/Application Support/Sublime Text/Installed Packages directory?

@jlariza
Copy link
Author

jlariza commented Oct 20, 2023

@rchl These are the packages I have installed:

Babel.sublime-package                Sass.sublime-package
Djaneiro.sublime-package             SideBarEnhancements.sublime-package
LSP-ruff.sublime-package             Vue Syntax Highlight.sublime-package
LSP.sublime-package                  VueFormatter.sublime-package
Package Control.sublime-package

@rchl
Copy link
Member

rchl commented Oct 20, 2023

This issue pops up in various places for PC4 users. I'm not sure why but someone more familiar with PC4 would have to look into it. I've created an issue for it at wbond/package_control#1656 now.

Note that this issue is unrelated to the original one which was fixed.

@rchl
Copy link
Member

rchl commented Oct 22, 2023

If you still have this issue could you share the Package Control.sublime-package file and also zip the whole Lib directory and also provide it? It would help debugging the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants