python: UnicodeEncodeError: 'ascii' codec can't encode character u'\xbb' ...: ordinal not in range...

I don’t fully understand utf-8 errors, but I’ve been getting this error.

So here’s a quick fix:

import sys
sys.setdefaultencoding('utf-8')