Monnoroch / ColorHighlighter

ColorHighlighter - is a plugin for the Sublime text 2 and 3, which underlays selected hexadecimal colorcodes (like "#FFFFFF", "rgb(255,255,255)", "white", etc.) with their real color. Also, plugin adds color picker to easily modify colors. Documentation: https://monnoroch.github.io/ColorHighlighter.
https://sublime.wbond.net/packages/Color%20Highlighter
1.31k stars 130 forks source link

Not working clean installation #478

Open AmrSubZero opened 4 years ago

AmrSubZero commented 4 years ago

Running Windows 10 (1903) and ST Version 3.2.2 Build 3211

I have tried to delete Color Highlighter folder and Package Control.cache then reinstall the plugin. but didn't work.

Console :

Traceback (most recent call last):

    File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 298, in on_api_ready
    plc()

    File "C:\Users\PC\AppData\Roaming\Sublime Text 3\Installed Packages\Color Highlighter.sublime-package\main.py", line 606, in plugin_loaded
    ColorHighlighterPlugin.init()

    File "C:\Users\PC\AppData\Roaming\Sublime Text 3\Installed Packages\Color Highlighter.sublime-package\main.py", line 319, in init
    ColorHighlighterPlugin._fake_color_scheme = ColorHighlighterPlugin.components.provide_fake_color_scheme()

    File "C:\Users\PC\AppData\Roaming\Sublime Text 3\Installed Packages\Color Highlighter.sublime-package\main.py", line 197, in provide_fake_color_scheme
    return self.provide_fake_color_scheme_data()[0]

    File "C:\Users\PC\AppData\Roaming\Sublime Text 3\Installed Packages\Color Highlighter.sublime-package\main.py", line 188, in provide_fake_color_scheme_data
    self._fake_color_scheme_data = parse_color_scheme(self.provide_color_scheme(), self._settings.debug)

    File "C:\Users\PC\AppData\Roaming\Sublime Text 3\Installed Packages\Color Highlighter.sublime-package\color_scheme.py", line 40, in parse_color_scheme
    color_scheme_content = load_resource.load_resource(color_scheme)

    File "C:\Users\PC\AppData\Roaming\Sublime Text 3\Installed Packages\Color Highlighter.sublime-package\load_resource.py", line 30, in load_resource
    return sublime.load_resource(file_path)

    File "C:\Program Files\Sublime Text 3\sublime.py", line 192, in load_resource
    raise IOError("resource not found")

OSError: resource not found

What causes this issue?

Flashwalker commented 3 years ago

Yeap, me to

risingphoenix commented 3 years ago

Me too, clean install Windows 10 (1809) and Sublime text 4 build 4107

Traceback (most recent call last):
  File "...\ST4\Lib\python33\sublime_plugin.py", line 528, in on_api_ready
    plc()
  File "...\ST4\Data\Installed Packages\Color Highlighter.sublime-package\main.py", line 606, in plugin_loaded
    ColorHighlighterPlugin.init()
  File "...\ST4\Data\Installed Packages\Color Highlighter.sublime-package\main.py", line 319, in init
    ColorHighlighterPlugin._fake_color_scheme = ColorHighlighterPlugin.components.provide_fake_color_scheme()
  File "...\ST4\Data\Installed Packages\Color Highlighter.sublime-package\main.py", line 197, in provide_fake_color_scheme
    return self.provide_fake_color_scheme_data()[0]
  File "...\ST4\Data\Installed Packages\Color Highlighter.sublime-package\main.py", line 188, in provide_fake_color_scheme_data
    self._fake_color_scheme_data = parse_color_scheme(self.provide_color_scheme(), self._settings.debug)
  File "...\ST4\Data\Installed Packages\Color Highlighter.sublime-package\color_scheme.py", line 43, in parse_color_scheme
    color_scheme_xml = ElementTree.fromstring(color_scheme_content)
  File "./python3.3/xml/etree/ElementTree.py", line 1356, in XML
  File "<string>", line None
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0
risingphoenix commented 3 years ago

after some tests I found that, in my case, the problem is was using a color scheme in the format .sublime-color-scheme. This seems to produce errors with the plugin/inline highlighting. Using instead a color scheme in .tmTheme format everything works correctly even in ST4 (I have not found anything in the documentation that refers to the tmTheme thing).

I preferred to switch plugins, now I use https://packagecontrol.io/packages/QColor with great satisfaction