Python3 fix (messae is already encoded by flask)
flake8 fixes