ColorHighlighter
ColorHighlighter copied to clipboard
convert error
console error message
convert error:
'utf-8' codec can't decode byte 0xce in position 0: invalid continuation byte
and CH dosen't work with many color codes
Two Colors below work, see screen capture lines 24, 25
color: #68CDD0; /* these colors work / color: #22292C; / these colors work */
What version of Sublime Text are you using?
What are contents of following files:
Preferences > Package Settings > Color Highlighter > Settings - User
Preferences > Package Settings > Color Highlighter > Settings - Default
Have you tried uninstalling and reinstalling Color Highlighter?
@yuchisu Please, try the code from this commit: https://github.com/Monnoroch/ColorHighlighter/commit/ba05905d37f7f63b3baf556bb2681d11fab901ef. This won't fix the issue, but will give additional debug info.
@Js-GitHub I'm sorry I didn't give enough information cause this is my first time to ask a question on github. I'm using the ST3 Build 3103 on win10. And I've tried reinstalling CH. I find it works normally when I'm taking the screenshot, but it get lose again after I restart the ST.
@yuchisu No problem, I'm new myself.
Save copy of: Preferences > Package Settings > Color Highlighter > Settings - User
Remove everything from file above except following:
Set "ha_style": "filled"
Lets start out with basics to troubleshoot and once we get it working you can customize
"enable": true... not needed as it's already true in Settings - Default
Not sure what "ha_icons & style" does so lets use what's in Settings - Default for now
Create a file named: "color_highlighter_demo.css" with following code so we're comparing apples to apples:
/*ColorHighlighter Demo */
.class {
color: black;
color: #000;
color: white;
color: #FFF;
color: grey;
color: red;
color: #F00;
color: green;
color: #0F0;
color: blue;
color: #00F;
color: gold;
color: pink;
color: fuchsia;
color: lime;
color: purple;
color: brown;
color: orange;
color: lightblue;
color: yellow;
color: #68CDD0; /* these colors work */
color: #22292C; /* these colors work */
}
Save all changes above. Restart Sublime Text ( exit / close it, then reopen it ).
Open "color_highlighter_demo.css" file
What are color_scheme & theme set to in: Preferences > Settings - User
Mine are following. You don't have to change yours. Including for reference only.
"color_scheme": "Packages/Neon Color Scheme/Neon.tmTheme", theme": "Material-Theme-Darker.sublime-theme",
@Js-GitHub thx a lot. I've set all of above to default and saved. The last status turns out not working.
And the console error message
I can't reproduce this on Ubuntu Linux. My guess is that's an issue with the encoding of the CLI on Windows.
@yuchisu I'll look at it later. In the interim google the last two lines in error output starting with:
convert error: 'utf-8'...
I'm using ST3 on Windows 10 and all screen captures above were from Win 10.
Also have ST3 on Ubuntu, but not using ST3 on Ubuntu much lately.
@Js-GitHub Allright, I think I'll give up. I've uninstalled the ST3, deleted the files in Appdata reinstalled and reinstalled it, but the issue still be there.
Maybe wo could end this discussion.
Don't I've up just yet. We'll look at it tomorrow. There's an explanation and possibly solution or bug fix...
Checkout this link
https://github.com/Monnoroch/ColorHighlighter/issues/112
I believe it may be workaround...
@Js-GitHub Thx, I was just working on the packages installing ... I'm looking #112 now.
That's not solution. I'm driving.
@Js-GitHub I've gave up, it's too difficult to solve this...
What causes convert error? When does it happen? What do you have to do cause error?
@Js-GitHub I don't know, I've ignored the problem. Anyway,it works on most of the color codes.
@yuchisu Try what Monnoroch suggested...
Please, try the code from this commit: ba05905 This won't fix the issue, but will give additional debug info.
@Js-GitHub Actually I don't know where to put the file...
@Monnoroch Do we just run the code inside ST3 ba05905
@Js-GitHub Well, I think package control should have updated the plugin by now, so just update, wait for this error and post the console log here.
@Monnoroch Should @yuchisu download file and run it inside ST3? ColorHighlighter.py
Does it change anything or just collect data?
Once it's run, do you want them to post output here?
I'm on cellphone so can't view much on my screen.
@Monnoroch Please elaborate on what you mean by update? Provide steps or instructions.
@Js-GitHub Thank god,finally I get the file run.
Traceback (most recent call last): File "C:\Users\ADMINI~1\AppData\Local\Temp\BNZ.56df8191916c6f7\ColorHighlighter.py", line 3, in <module> import sublime, sublime_plugin ImportError: No module named 'sublime' [Finished in 0.1s with exit code 1] [shell_cmd: python -u "C:\Users\ADMINI~1\AppData\Local\Temp\BNZ.56df8191916c6f7\ColorHighlighter.py"] [dir: C:\Users\ADMINI~1\AppData\Local\Temp\BNZ.56df8191916c6f7] [path: C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Administrator\AppData\Local\Programs\Python\Python35;C:\Users\Administrator\AppData\Local\Programs\Python\Python35\Scripts\;C:\Program Files\Bandizip\7z;C:\Users\Administrator\AppData\Local\atom\bin]
@yuchisu Nope, you didn't. As I told you, you just needed o update the plugin via Package Control.
@Monnoroch
But this told me there are no packages ready for upgrade.
Maybe it already had it upgraded?
@Monnoroch Know you are busy and appreciate your help.
But what are next steps?
What should @yuchisu Try now to help you isolate and identify issue?
Will running ColorHighlighter.py provide any additional info?
ColorHighlighter.py imports sublime. How does one install sublime module for python? pip install sublime?
@Js-GitHub No-no, nothing like that. You just have to wait until the bug reveals itself and paste the console log here.
@yuchisu Seems like you are able to reproduce the problem 100% whenever you open a CSS file that contains the reference to the color: #22292C;
In sublime text do following: a. Menu bar > View > Show Console b. Open the "color_highlighter_demo.css" file you created earlier c. the "convert error" message should pop up d. paste contents here.
To isolate the problem even future: a. close all open files in sublime text b. create another css file named color_highlighter_one_color.css c. put following line in it ( to test that color only ) since that is what error message shows
d. Open the color_highlighter_one_color.css e. You should get same error f. post that error here also
Make sure you label output so monnoroch knows console output is associated with each file.
While I open the "color_highhlighter_demo.css"file, there's no error pop up. I click on "#22292C", it comes
CONVERT CALL: convert -type TrueColorMatte -channel RGBA -size 32x32 -alpha transparent xc:none -fill "#22292CFF" -draw "circle 15,16 8,10" png32:"C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\User\Color Highlighter\icons\22292CFF" convert error: 'utf-8' codec can't decode byte 0xce in position 0: invalid continuation byte CONVERT CALL: convert -type TrueColorMatte -channel RGBA -size 32x32 -alpha transparent xc:none -fill "#22292CFF" -draw "circle 15,16 8,10" png32:"C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\User\Color Highlighter\icons\22292CFF" convert error: 'utf-8' codec can't decode byte 0xce in position 0: invalid continuation byte
I open the "color-highlighter-demo.css" file just contain "#22292C" , it comes
CONVERT CALL: convert -type TrueColorMatte -channel RGBA -size 32x32 -alpha transparent xc:none -fill "#22292CFF" -draw "circle 15,16 8,10" png32:"C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\User\Color Highlighter\icons\22292CFF" convert error: 'utf-8' codec can't decode byte 0xce in position 0: invalid continuation byte CONVERT CALL: convert -type TrueColorMatte -channel RGBA -size 32x32 -alpha transparent xc:none -fill "#22292CFF" -draw "circle 15,16 8,10" png32:"C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\User\Color Highlighter\icons\22292CFF" convert error: 'utf-8' codec can't decode byte 0xce in position 0: invalid continuation byte CONVERT CALL: convert -type TrueColorMatte -channel RGBA -size 32x32 -alpha transparent xc:none -fill "#22292CFF" -draw "circle 15,16 8,10" png32:"C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\User\Color Highlighter\icons\22292CFF" convert error: 'utf-8' codec can't decode byte 0xce in position 0: invalid continuation byte
@Monnoroch I've removed the CH ,delete the CH folder and reinstalled the CH. But it still remained unsolved as above.
Hi @yuchisu, you has installed this: ImageMagick
The convert error: 'utf-8' codec can't decode byte 0xce in position 0: invalid continuation byte
is why ImageMagick isn't in your PATH.
Try this: http://www.imagemagick.org/download/binaries/ImageMagick-6.9.3-7-Q16-x64-dll.exe if the Windows 10 is x64 or http://www.imagemagick.org/download/binaries/ImageMagick-6.9.3-7-Q16-x86-dll.exe if the Windows is x86
@LOQUILLO Thank you very much, it works.
I had the problem too(windows os) and there's a simple way: edit colorhighlighter user settings
{
"icons": false,
}