Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错如何解决 #694

Open
1 task done
GD2021 opened this issue Oct 20, 2024 · 1 comment
Open
1 task done

报错如何解决 #694

GD2021 opened this issue Oct 20, 2024 · 1 comment

Comments

@GD2021
Copy link

GD2021 commented Oct 20, 2024

Issues

  • I have browsed through the Issues. 我已浏览过Issues,确定没有重复提问。

Umi-OCR version 程序版本

2.1.4

Windows version 系统版本

win11

OCR plugins Used 使用的OCR插件

Pix2Text

Reproduction steps 复现步骤

异常状态码:102
异常信息:[Error] Doc P1
[Error] OCR code:803 msg:任务提前结束。[Error] Repo id must use alphanumeric chars or '-', '', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'D:\Program Files\Umi_OCR_文字识别工具v2_1_4_正式版'.

Problem screenshots or related files (optional) 问题截图或相关文件(可选)

image
image
请问,像我这样竖放发票,应该如何设置才能识别?

@hiroi-sora
Copy link
Owner

根据报错信息,定位到异常最终在第三方库 huggingface_hub utils/_validators.py159 行抛出,表示 repo_id 不合法。业务中,此异常应该在 p2t_api.py 实例化P2T时引发,触发原因很可能是模型库或依赖库的 文件名或文件路径无法识别

避免此异常的建议:

  • 尝试在别的目录,如全英文目录或者D盘根目录下放置 Umi-OCR ,看看是否正常使用。
  • 如果你的识别内容(发票)不含数学公式,建议关闭 启用数学公式 的选项,也许可以提高兼容性和加快识别速度。
  • 或者,换用兼容性更好的OCR引擎插件,如 RapidOCR 。(注意,如果使用Rapid或Paddle插件,需要勾选 纠正文本方向 才能识别竖放的文字。)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants