From 55d95d304254f9d550dc5f5fb3158bb4b9e3d947 Mon Sep 17 00:00:00 2001 From: dddennnisss Date: Fri, 14 Aug 2026 11:51:56 +0700 Subject: [PATCH] =?UTF-8?q?handlers.py:=20NameError=20image=5Fbytes->raw?= =?UTF-8?q?=5Fbytes=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_bot/handlers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/photo_bot/handlers.py b/photo_bot/handlers.py index 033576b..553575e 100644 --- a/photo_bot/handlers.py +++ b/photo_bot/handlers.py @@ -261,7 +261,7 @@ async def photo_module_handler(msg: Message): try: from PIL import Image import io - img = Image.open(io.BytesIO(image_bytes)) + img = Image.open(io.BytesIO(raw_bytes)) if img.mode != 'RGB': img = img.convert('RGB') @@ -288,7 +288,7 @@ async def photo_module_handler(msg: Message): # Сохраняем оригинал и координаты original_path = f"/tmp/orig_{user_login}.jpg" with open(original_path, 'wb') as f: - f.write(image_bytes) + f.write(raw_bytes) pending_photos[user_id] = { 'path': original_path,