From 887760acc170daeff4c77d926893769dd2d5279e Mon Sep 17 00:00:00 2001 From: j Date: Fri, 18 Jun 2021 12:23:10 +0100 Subject: [PATCH] e.read() returns bytes --- ox/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox/api.py b/ox/api.py index b784788..894e26d 100644 --- a/ox/api.py +++ b/ox/api.py @@ -100,7 +100,7 @@ class API(object): if self.DEBUG: import webbrowser if e.code >= 500: - with open('/tmp/error.html', 'w') as f: + with open('/tmp/error.html', 'wb') as f: f.write(e.read()) webbrowser.open_new_tab('/tmp/error.html')