sublime-evernote icon indicating copy to clipboard operation
sublime-evernote copied to clipboard

Exception during opening note with unicode characters with "debug": "True"

Open pimlock opened this issue 9 years ago • 2 comments

When the "debug" setting is set to "True" it turns on logging. One of the things that are being logged is body of the note that is being opened. If note contains UTF-8 characters that are encoded in more than one byte (basically all characters that are not ASCII) opening of the note fails with exception:

Evernote plugin error: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128)

This is caused by the fact that sublime changes sys.sysout to their sublime_api.log_message that apparently then tries to decode the string using ASCII encoding, which fails.

pimlock avatar May 15 '15 04:05 pimlock

@pimlock thanks for looking into this. I cannot seem to be able to reproduce the issue (on Linux). The ST3 console seems able to print unicode characters correctly...

bordaigorl avatar Aug 25 '15 20:08 bordaigorl

Hi, I am not sure if I am getting the same issue as this issue. When I try to list my recent Evernote note, I encounter an error stating,

Evernote plugin error: unpack requires a bytes object of length 1 Last command: {}

I switched on the debug mode on my Evernote.sublime-settings, and what happens now is that I saw the same error message occurs with slightly different output:

Evernote plugin error: unpack requires a bytes object of length 1 Last command: insert {'characters': ' true'}

francis-pang avatar Aug 11 '19 03:08 francis-pang