From f2060d5143f5c4b14bfff723d238c497a0053f17 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 11 Oct 2018 17:33:28 +0200 Subject: add_task: read images as bytes, not str --- kpov_judge/add_task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kpov_judge') diff --git a/kpov_judge/add_task.py b/kpov_judge/add_task.py index 9e25048..92e0c37 100755 --- a/kpov_judge/add_task.py +++ b/kpov_judge/add_task.py @@ -110,7 +110,7 @@ if __name__ == '__main__': else: for img in glob.glob(os.path.join(howto_dir, '*')): fname = os.path.basename(img) - with open(img) as f: + with open(img, 'rb') as f: db.howto_images.update({ 'task_id': task_id, 'class_id': class_id, -- cgit v1.2.1