Browse Source

Decode from string to bytes.

Bentley James Oakes 7 years ago
parent
commit
1844f89d69
1 changed files with 2 additions and 2 deletions
  1. 2 2
      services/HUTN/main.py

+ 2 - 2
services/HUTN/main.py

@@ -35,7 +35,7 @@ def compile_service(port):
             return [0]
 
         with open(temp_file, "w") as f:
-            f.write(code)
+            f.write(code.decode())
             f.flush()
 
         compiled = do_compile(temp_file, COMPILER_PATH + "/grammars/actionlanguage.g", "CS")
@@ -49,7 +49,7 @@ def compile_service(port):
             return [0]
 
         with open(temp_file, "w") as f:
-            f.write(code)
+            f.write(code.decode())
             f.flush()
 
         compiled = do_compile(temp_file, COMPILER_PATH + "/grammars/modelling.g", "M")