Thanks djbaldey for the report.
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
import sys
from importlib import import_module
@@ -10,3 +10,6 @@ Bugfixes
========
* Replace with actual issue (:ticket:`00000`).
+* Fixed a ``UnicodeDecodeError`` when the ``flush`` error message contained
+ Unicode characters (:ticket:`22882`).