diff --git a/pytools/prefork.py b/pytools/prefork.py
index be388f3d5ab60e8abc8b42898dc3ad9619ce624d..864c168a10b9e9a161ee64aa1aafbfc4591205ea 100644
--- a/pytools/prefork.py
+++ b/pytools/prefork.py
@@ -53,7 +53,7 @@ class DirectForker(object):
             if error_on_nonzero and popen.returncode:
                 raise ExecError("status %d invoking '%s': %s"
                                 % (popen.returncode, " ".join(cmdline),
-                                   stderr_data))
+                                   stderr_data.decode("utf-8", errors="replace")))
 
             return popen.returncode, stdout_data, stderr_data
         except OSError as e: