My initial guess is that we might need something like this at the top level:
if sys.version >= '3':
# Force encoding to UTF-8 even in non-UTF-8 locales.
import io
sys.stderr = io.TextIOWrapper( sys.stderr.detach(), encoding="UTF-8", line_buffering=True)
My initial guess is that we might need something like this at the top level:
if sys.version >= '3':
sys.stderr. detach( ), encoding="UTF-8", line_buffering= True)
# Force encoding to UTF-8 even in non-UTF-8 locales.
import io
sys.stderr = io.TextIOWrapper(