Fix UnicodeDecodeError if Python 3 is primary