You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to bugs, this package does not work as intended with Sublime Text 3.2.2.
System
I am using the latest release of "Color Highlighter", using Sublime Text version 3.2.2, Build 3211.
The Issue
The color picker is working, but text highlighting is not:
Investigation
The console window gives the following output when sublime text opens:
raise IOError("resource not found")
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\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\main.py",
line 606,
in plugin_loaded
ColorHighlighterPlugin.init()
File "C:\Users\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\main.py",
line 319,
in init
ColorHighlighterPlugin._fake_color_scheme = ColorHighlighterPlugin.components.provide_fake_color_scheme()
File "C:\Users\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\main.py",
line 197,
in provide_fake_color_scheme
return self.provide_fake_color_scheme_data()[0]
File "C:\Users\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\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\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\color_scheme.py",
line 40,
in parse_color_scheme
color_scheme_content = load_resource.load_resource(color_scheme)
File "C:\Users\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\load_resource.py",
line 34,
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
So, I added the following code to the start of the function load_resource.py.load_resource: file_path = "Packages/Color Scheme - Default/" + file_path
This allowed more of the porogram to load, until it reached this error:
xml.etree.ElementTree.ParseError: not well-formed (invalid token)
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\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\main.py", line 606, in plugin_loaded
ColorHighlighterPlugin.init()
File "C:\Users\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\main.py", line 319, in init
ColorHighlighterPlugin._fake_color_scheme = ColorHighlighterPlugin.components.provide_fake_color_scheme()
File "C:\Users\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\main.py", line 197, in provide_fake_color_scheme
return self.provide_fake_color_scheme_data()[0]
File "C:\Users\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\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\jmayberry\AppData\Roaming\Sublime Text 3\Packages\Color Highlighter\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
In my case, the variable being passed to ElementTree.fromstring was not a string of XML- but a python dictionary as a string:
tl;dr
Due to bugs, this package does not work as intended with Sublime Text 3.2.2.
System
I am using the latest release of "Color Highlighter", using Sublime Text version 3.2.2, Build 3211.
The Issue
The color picker is working, but text highlighting is not:

Investigation
The console window gives the following output when sublime text opens:
raise IOError("resource not found")
So, I added the following code to the start of the function

load_resource.py.load_resource
:file_path = "Packages/Color Scheme - Default/" + file_path
This allowed more of the porogram to load, until it reached this error:
xml.etree.ElementTree.ParseError: not well-formed (invalid token)
In my case, the variable being passed to
ElementTree.fromstring
was not a string of XML- but a python dictionary as a string:print(color_scheme_content)
I tried to see if I could resolve this issue further, but it looks like it is going to require quite a bit of re-writing.
The text was updated successfully, but these errors were encountered: