From 76dfae89ad7af248d12af6e616633d72e5058773 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Mon, 8 Aug 2022 04:19:39 +0300 Subject: [PATCH] fix --- bots/management/commands/channel_helper_calculate_hashes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bots/management/commands/channel_helper_calculate_hashes.py b/bots/management/commands/channel_helper_calculate_hashes.py index 018a73f..dae4b41 100644 --- a/bots/management/commands/channel_helper_calculate_hashes.py +++ b/bots/management/commands/channel_helper_calculate_hashes.py @@ -1,3 +1,4 @@ +import json from io import BytesIO import imagehash @@ -13,7 +14,7 @@ class Command(BaseCommand): def handle(self, *args, **options): for item in tqdm(QueuedItem.objects.filter(type='photo', image_hash__isnull=True)): bot: Bot = item.config.bot.get_bot() - file = bot.get_file(item.args[0]) + file = bot.get_file(json.loads(item.args)[0]) io = BytesIO() io.name = 'file.jpg' file.download(out=io)