-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
paddleocr infer_rec打包失败framework_pb2 #5326
Comments
可否提供一下完整的报错信息? |
(paddleocr) D:\PaddleOCR\tools\dist>infer_rec.exe During handling of the above exception, another exception occurred: Traceback (most recent call last): |
我是将 site-packages/paddle/fluid/中的proto文件夹复制到生成的dist/paddle/fluid/下 |
I have the same problem :( |
我的这样改就可以了:
|
@xushengfeng 试了下你的方案,我的还是报这个错; |
paddle\dataset\image.py has suppress process bug: it opens many processes. if you don't want cv2 you can change it like this: source:
change to below:
|
@shoou it works |
你那边可以了嘛 |
所有的方法都用啦,还是报错,怎么解决?你们的模型需要导出来放到指定位置吗? |
第一,我是将 site-packages/paddle/fluid/中的proto文件夹复制到生成的dist/paddle/fluid/下 做完两步后报错: ` |
统一的问题,请教一下如何解决? |
我最后用了另外一个方法解决啦,但是打下来的包很大,如果不建议包体积可以试试我用的方法
…---原始邮件---
发件人: ***@***.***>
发送时间: 2023年12月4日(周一) 晚上9:43
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [PaddlePaddle/PaddleOCR] paddleocr infer_rec打包失败framework_pb2 (Issue #5326)
@xushengfeng 试了下你的方案,我的还是报这个错; @geoexploring 按照你的方式试了,报新的错误: File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module File "paddle__init__.py", line 71, in File "", line 1007, in _find_and_load File "", line 986, in find_and_load_unlocked File "", line 680, in load_unlocked File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module File "paddle\dataset__init.py", line 27, in File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module File "paddle\dataset\flowers.py", line 39, in File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module File "paddle\dataset\image.py", line 48, in File "subprocess.py", line 829, in init File "subprocess.py", line 1252, in _get_handles OSError: [WinError 6] 句柄无效。 还得继续折腾。
统一的问题,请教一下如何解决?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
我也是,前两步都可以了,有出现如下问题: |
我用的方法不需要搞这些,也简单,啥都不用搞,配置好直接打包就行啦
…---原始邮件---
发件人: ***@***.***>
发送时间: 2023年12月4日(周一) 晚上10:18
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [PaddlePaddle/PaddleOCR] paddleocr infer_rec打包失败framework_pb2 (Issue #5326)
第一,我是将 site-packages/paddle/fluid/中的proto文件夹复制到生成的dist/paddle/fluid/下 第二,Lib\site-packages\paddle\fluid\proto\pass_desc_pb2.py下,将import framework_pb2 as framework__pb2改成import paddle.fluid.proto.framework_pb2 as framework__pb2。
做完两步后报错: ` Traceback (most recent call last): File "main.py", line 1, in File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddleocr__init__.py", line 14, in File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddleocr\paddleocr.py", line 33, in File "importlib__init__.py", line 127, in import_module ModuleNotFoundError: No module named 'tools'
`
我也是,前两步都可以了,有出现如下问题:
(paddle) G:\dongyongfei786\multimodal-lm\third_party\ppocrlabel-pil\dist>PPOCRLabel.exe
Traceback (most recent call last):
File "ppocrlabel-pil\PPOCRLabel.py", line 41, in
from paddleocr import PaddleOCR, PPStructure
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "paddleocr_init.py", line 14, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "paddleocr\paddleocr.py", line 43, in
File "paddleocr\paddleocr.py", line 37, in _import_file
File "", line 839, in exec_module
File "", line 975, in get_code
File "", line 1032, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\21702\AppData\Local\Temp\_MEI271362\paddleocr\tools/init.py'
[7336] Failed to execute script 'PPOCRLabel' due to unhandled exception!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
PaddleOCR识别模型打包正常,运行报错No module named 'framework_pb2 pyinstaller -F infer_rec.py
记录于2022/1/24
ModuleNotFoundError: No module named 'framework_pb2'
The text was updated successfully, but these errors were encountered: