diff --git a/server/tools/process-remote.py b/server/tools/process-remote.py index 9cd5c48fe0c289ac56572f91e12deaad7bc1d80b..870472f3e327c9a5a8f7c7902b88fd935c86c4a2 100644 --- a/server/tools/process-remote.py +++ b/server/tools/process-remote.py @@ -17,7 +17,7 @@ a = parser.parse_args() def main(): - with open(a.input_file) as f: + with open(a.input_file, "rb") as f: input_data = f.read() output_data = urlopen(a.url, data=input_data).read() @@ -25,4 +25,4 @@ def main(): with open(a.output_file, "wb") as f: f.write(output_data) -main() \ No newline at end of file +main() diff --git a/tools/tfimage.py b/tools/tfimage.py index 0c6f3d5f13f05958eab35c7ff6592c81c45c22ea..cbc736fc10132756d507bd8a2d84b9d62651071b 100644 --- a/tools/tfimage.py +++ b/tools/tfimage.py @@ -95,7 +95,7 @@ to_float32 = create_op( def load(path): - with open(path) as f: + with open(path, "rb") as f: contents = f.read() _, ext = os.path.splitext(path.lower())