diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2018-10-11 17:33:28 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2018-10-11 17:33:28 +0200 |
commit | f2060d5143f5c4b14bfff723d238c497a0053f17 (patch) | |
tree | 030a1ea6176dccaf7e34a91ed2fe8ef758e4fc35 /kpov_judge | |
parent | f44c247784ca524f9da861c9b264f0fdc5255629 (diff) |
add_task: read images as bytes, not str
Diffstat (limited to 'kpov_judge')
-rwxr-xr-x | kpov_judge/add_task.py | 2 |
1 files changed, 1 insertions, 1 deletions
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, |