Filing here because there’s no bug tracker for snappy-debug.
I had snappy-debug.security scanlog running in a terminal today, and it died. I was running the libreoffice snap, and used the file dialog to open/save a file. When I went back to the snappy-debug window, i saw this:
Traceback (most recent call last):
File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 1195, in <module>
sys.exit(main())
File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 1183, in main
from_end=opt.only_new, exclude=opt.exclude)
File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 209, in __init__
self.scan_log(logs, snap_name, follow, from_end)
File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 377, in scan_log
_scan_line(line, snap_name)
File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 315, in _scan_line
self._print_entry(entry)
File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 261, in _print_entry
sys.stdout.write("%s\n" % out)
UnicodeEncodeError: 'ascii' codec can't encode character '\xc0' in position 271: ordinal not in range(128)
I’ve seen this in other python apps. I believe it’s trying to coerce the unicode character 0x00C0 (á) into ASCII resulting in 0x00 (null) and 0xC0 (└ in the extended ASCII table sometimes known as the ANSI table) characters of which 0xC0 is the failing one because it has a decimal value of 192 which is larger than the ASCII set’s maximum value of 128.
FYI, I am able to reproduce this in the snap, but not a system with a newer python3. I’ll work through that difference and update the tool accordingly.