Avoid implicit string encoding.
Use the python3 print syntax
Workaround for Python bug #10805