Avoid BytesWarning in debugging messages in Python 3