diff --git a/photo_review/auto_photo_review.py b/photo_review/auto_photo_review.py index 3cde772..014ab10 100644 --- a/photo_review/auto_photo_review.py +++ b/photo_review/auto_photo_review.py @@ -141,7 +141,9 @@ def information_extraction(phrec, pk_phhd): if split_result['img'] is None: continue a4_img = image_util.expand_to_a4_size(split_result['img']) - ocr_result += model_util.ocr(a4_img) + tmp_ocr_result = model_util.ocr(a4_img) + if tmp_ocr_result: + ocr_result += tmp_ocr_result tmp_ocr_text = common_util.ocr_result_to_text(ocr_result) tmp_rec_type = model_util.clas_text(tmp_ocr_text) if ocr_text else None