From 90cf72b06c0b6bc2b16827118963ca84ce377f6f Mon Sep 17 00:00:00 2001 From: lededev Date: Sun, 6 Feb 2022 19:36:07 +0800 Subject: [PATCH] fix param name --- ddddocr/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddddocr/__init__.py b/ddddocr/__init__.py index e6295d2..41aa654 100644 --- a/ddddocr/__init__.py +++ b/ddddocr/__init__.py @@ -1587,11 +1587,11 @@ def classification(self, img): if not isinstance(img, (bytes, str, pathlib.PurePath, Image.Image)): raise TypeError("未知图片类型") if isinstance(img, bytes): - image = Image.open(io.BytesIO(img_bytes)) + image = Image.open(io.BytesIO(img)) elif isinstance(img, Image.Image): image = img.copy() elif isinstance(img, str): - image = base64_to_image(img_base64) + image = base64_to_image(img) else: assert isinstance(img, pathlib.PurePath) image = Image.open(img)