How to fix: “UnicodeDecodeError: ‘ascii’ codec can’t decode byte”

tl;dr / quick fix Don’t decode/encode willy nilly Don’t assume your strings are UTF-8 encoded Try to convert strings to Unicode strings as soon as possible in your code Fix your locale: How to solve UnicodeDecodeError in Python 3.6? Don’t be tempted to use quick reload hacks Unicode Zen in Python 2.x – The Long … Read more

tech