sublimelsp / LSP

Client implementation of the Language Server Protocol for Sublime Text
https://lsp.sublimetext.io/
MIT License
1.63k stars 181 forks source link

FileNotFoundError: resource "Packages/LSP/popups.css" not found #2502

Open joshmfrankel opened 1 month ago

joshmfrankel commented 1 month ago

Describe the bug

Installing LSP and enabling the plugin produces a FileNotFoundError for popups.css

To Reproduce

Steps to reproduce the behavior:

  1. Package Control: Install Package
  2. Select "LSP"
  3. Console produces error

Expected behavior

popups.css should be found when loading package allowing package to load

Logs

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 432, in load_module
    m.plugin_loaded()
  File "/Users/joshfrankel/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/boot.py", line 197, in plugin_loaded
    load_css()
  File "/Users/joshfrankel/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/css.py", line 23, in load
    _css = CSS()
  File "/Users/joshfrankel/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/css.py", line 7, in __init__
    self.popups = sublime.load_resource("Packages/LSP/popups.css")
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime.py", line 1199, in load_resource
    raise FileNotFoundError(f'resource "{name}" not found')
FileNotFoundError: resource "Packages/LSP/popups.css" not found

Environment (please complete the following information):

Additional context

rchl commented 1 month ago
tungp99 commented 1 month ago
  • Is this the first and only error that you see on ST startup?

    • Does it happen on every start of ST or only during installation of the LSP package?

I experience the same issue, only when installing LSP package.

rchl commented 1 month ago

We are trying to load those resources from within a def plugin_loaded() hook so if it fails on install, it feels more like an ST issue. Though we could probably work around it.

Seems like a trivial issue if it only happens on install since it will be fine after first restart (which is recommended anyway).