q icon indicating copy to clipboard operation
q copied to clipboard

Running without choosing encoding on an iso-8859 file fails with a traceback

Open harelba opened this issue 4 years ago • 1 comments

The AttributeError("'UnicodeDecodeError' object has no attribute 'message'") is being written to stderr, instead of a proper encoding warning.

harelba avatar Apr 29 '21 16:04 harelba

This is because the program handles a ValueError by catching it and printing out the message attribute, but UnicodeDecodeError is a subclass of ValueError and lacks a message attribute. UnicodeDecodeError needs to be caught before ValueError. Will try to file a PR soon.

clsn avatar Sep 03 '21 14:09 clsn