diff --git a/server/compiler.py b/server/compiler.py index 5f6616f..3a4a03e 100644 --- a/server/compiler.py +++ b/server/compiler.py @@ -24,11 +24,11 @@ class Compiler(object): max_stack=128 * 1024 * 1024, max_output_size=1024 * 1024, max_process_number=_judger.UNLIMITED, - exe_path=_command[0], + exe_path=_command[0].encode("utf-8"), # /dev/null is best, but in some system, this will call ioctl system call - input_path=src_path, - output_path=compiler_out, - error_path=compiler_out, + input_path=src_path.encode("utf-8"), + output_path=compiler_out.encode("utf-8"), + error_path=compiler_out.encode("utf-8"), args=[item.encode("utf-8") for item in _command[1::]], env=[("PATH=" + os.getenv("PATH")).encode("utf-8")], log_path=COMPILER_LOG_PATH,