779b9a10 by 周伟奇

fix error msg

1 parent 55c99301
...@@ -85,6 +85,7 @@ RES_SUCCESS_OTHER = '识别成功(其他类)' ...@@ -85,6 +85,7 @@ RES_SUCCESS_OTHER = '识别成功(其他类)'
85 RES_SUCCESS_EMPTY = '识别成功(空数据)' 85 RES_SUCCESS_EMPTY = '识别成功(空数据)'
86 RES_FAILED_1 = '识别失败(阶段1)' 86 RES_FAILED_1 = '识别失败(阶段1)'
87 RES_FAILED_2 = '识别失败(阶段2)' 87 RES_FAILED_2 = '识别失败(阶段2)'
88 RES_FAILED_3 = '识别失败(阶段1数据格式错误)'
88 89
89 CARD_RATIO = 0.9 90 CARD_RATIO = 0.9
90 UNKNOWN_CARD = '未知卡号' 91 UNKNOWN_CARD = '未知卡号'
......
...@@ -496,7 +496,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -496,7 +496,7 @@ class Command(BaseCommand, LoggerMixin):
496 if res.get('code') == 1: 496 if res.get('code') == 1:
497 ocr_data_list = res.get('data', []) 497 ocr_data_list = res.get('data', [])
498 if not isinstance(ocr_data_list, list): 498 if not isinstance(ocr_data_list, list):
499 res_list.append((pno, ino, consts.RES_FAILED_1)) 499 res_list.append((pno, ino, consts.RES_FAILED_3))
500 self.cronjob_log.info('{0} [ocr_1 res error] [img={1}] [res={2}]'.format( 500 self.cronjob_log.info('{0} [ocr_1 res error] [img={1}] [res={2}]'.format(
501 self.log_base, img_path, res)) 501 self.log_base, img_path, res))
502 else: 502 else:
...@@ -504,7 +504,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -504,7 +504,7 @@ class Command(BaseCommand, LoggerMixin):
504 ino_part = '{0}-{1}'.format(ino, part_idx) 504 ino_part = '{0}-{1}'.format(ino, part_idx)
505 classify = ocr_data.get('classify') 505 classify = ocr_data.get('classify')
506 if classify is None: 506 if classify is None:
507 res_list.append((pno, ino_part, consts.RES_FAILED_1)) 507 res_list.append((pno, ino_part, consts.RES_FAILED_3))
508 self.cronjob_log.info('{0} [ocr_1 res error] [img={1}] [res={2}]'.format( 508 self.cronjob_log.info('{0} [ocr_1 res error] [img={1}] [res={2}]'.format(
509 self.log_base, img_path, res)) 509 self.log_base, img_path, res))
510 continue 510 continue
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!