diff --git a/oargen.py b/oargen.py
index 74ab3e579ebb2ba0e4bdcc6f1ac30dd54c844a37..54d7dcb95cf3b992d9307c398b66b9bb0edbde25 100755
--- a/oargen.py
+++ b/oargen.py
@@ -102,7 +102,7 @@ def run_oarsub(command, print_cmd=False, fake_run=False, return_output=False):
     if not return_output:
         subprocess.call(command)
         return None
-    return subprocess.check_output(command)
+    return subprocess.check_output(command).decode("utf8")
 
 
 def main():