sublimelsp / LSP

Client implementation of the Language Server Protocol for Sublime Text

Home Page:https://lsp.sublimetext.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'wcmatch.glob'

chrisjsewell opened this issue · comments

Can't get it to work at all 🥲:

Freshly installed sublime:

  • Apple M2 Pro: Sonoma 14.4
  • Sublime text build 4169
  • Package Control v4.0.6, LSP v2.0.0
reloading settings Packages/User/Preferences.sublime-settings
generating syntax summary
reloading /Users/chrisjsewell/Library/Application Support/Sublime Text/Packages/User/Preferences.sublime-settings
ignored packages updated to: ["Vintage"]
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
reloading plugin LSP.boot
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 325, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.8/importlib/__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 868, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/chrisjsewell/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/boot.py", line 6, in <module>
  File "/Users/chrisjsewell/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/__init__.py", line 12, in <module>
  File "/Users/chrisjsewell/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/registry.py", line 4, in <module>
  File "/Users/chrisjsewell/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/sessions.py", line 3, in <module>
  File "/Users/chrisjsewell/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/diagnostics_storage.py", line 4, in <module>
  File "/Users/chrisjsewell/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/views.py", line 39, in <module>
  File "/Users/chrisjsewell/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/settings.py", line 3, in <module>
  File "/Users/chrisjsewell/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/types.py", line 9, in <module>
ModuleNotFoundError: No module named 'wcmatch.glob'
generating syntax summary
reloading /Users/chrisjsewell/Library/Application Support/Sublime Text/Packages/User/Preferences.sublime-settings

Can repro on ST 4173, LSP 2.0.0 with all servers, Win 10.

Hello,

Can you check the section LSP is broken after the update even if Sublime Text is restarted many times from -> https://github.com/sublimelsp/LSP/releases/tag/4070-2.0.0#FAQ

And see if the 2 suggested checks can resolve your issue?


Someone also posted the same error message on Discord, but not many minutes after posted that the issue had been fixed by:

nvm, I upgraded the packages but didnt upgrade LSP, my bad, now its working


You mentioned that you have a freshly installed ST app.
Which means that there is a high chance you have Package Control v3 installed
And that Package Control didn't yet update to v4 (v4 added support for python 3.8)

Can you see what your version of Package Control is?
From the command palette you can select, Package Control: List Packages, then look for Package Control.

Can you see what your version of Package Control is?

I can confirm that it is v4.0.6 (added to initial comment)

Coming from the other linked issue for package control (see above), here's a couple errors that are responsible for LSP failing:

Package Control: Installing 5 libraries...
Package Control: The library "lsp_utils" is not available for Python 3.8
Package Control: The library "bracex" is not available for Python 3.8
Package Control: The library "sublime_lib" is not available for Python 3.8
Package Control: The library "mdpopups" is not available for Python 3.8
Package Control: The library "wcmatch" is not available for Python 3.8

Make sure your Package Control settings contain correct "channel".

All those libraries are provided for python 3.8 by a 2nd channel, which must be the first one in the list. Please refer to default settings of Package Control or this README.

Ah ok yes after restarting multiple times it now appears to be working 🎉

I swear I must of restarted at least five times 😅, but yeh thanks for the feedback!

Strange. My test setup was back on duty after a single restart, this morning.

It just took various rounds yesterday, when not all upgraded helper packages were available at the same time.

Required libraries are installed before a package is actually installed/upgraded and thus should be available immediately when re-enabling it. Issues may arise only due to multiple helper packages depending on LSP, which may cause trouble they temporarily run on different plugin_hosts.

commented

Can you check the section LSP is broken after the update even if Sublime Text is restarted many times from -> https://github.com/sublimelsp/LSP/releases/tag/4070-2.0.0#FAQ

And see if the 2 suggested checks can resolve your issue?

Doesn't help @predragnikolic.

Make sure your Package Control settings contain correct "channel".

All those libraries are provided for python 3.8 by a 2nd channel, which must be the first one in the list. Please refer to default settings of Package Control or this README.

But this does, I didn't have v4.

Make sure your Package Control settings contain correct "channel".

All those libraries are provided for python 3.8 by a 2nd channel, which must be the first one in the list. Please refer to default settings of Package Control or this README.

Well done!

LSP run and wcmatch problem overcomed. And one more little trouble come:
FileNotFoundError: resource "Packages/LSP/popups.css" not found

Make sure your Package Control settings contain correct "channel".

I don't see "channel" overrides in my Package Control sublime-settings, and yet I'm getting this error on start:

Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python38/sublime_plugin.py", line 325, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.8/importlib/__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 868, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/ratijas/.config/sublime-text/Installed Packages/LSP.sublime-package/boot.py", line 6, in <module>
  File "/home/ratijas/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/__init__.py", line 12, in <module>
  File "/home/ratijas/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/registry.py", line 4, in <module>
  File "/home/ratijas/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/sessions.py", line 3, in <module>
  File "/home/ratijas/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/diagnostics_storage.py", line 4, in <module>
  File "/home/ratijas/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/views.py", line 39, in <module>
  File "/home/ratijas/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/settings.py", line 3, in <module>
  File "/home/ratijas/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/types.py", line 9, in <module>
ModuleNotFoundError: No module named 'wcmatch'

Make sure your Package Control settings contain correct "channel".

I don't see "channel" overrides in my Package Control sublime-settings, and yet I'm getting this error on start:

I would suggest manually run sastify libraries and maybe restart ST after it finishes.
image

Here is the solution

It has been one month after the v2 update.
I would assume that most people no longer will experience this error that can occur after the update.
So I will close the issue.