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

使用python脚本运行,报错如下。使用其他方式运行,除了新窗口出现一会儿再闪退外,没有其他反应 #129

Open
tlishi opened this issue Dec 25, 2024 · 2 comments

Comments

@tlishi
Copy link

tlishi commented Dec 25, 2024

这是python脚本运行(python PPOCRLabel.py --lang ch)的报错信息:
信息: 用提供的模式无法找到文件。
D:\a\pythonTool\Anaconda3\envs\paddleocr\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:686: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
warnings.warn(warning_message)
[2024/12/25 19:39:19] ppocr WARNING: When args.layout is false, args.ocr is automatically set to false
Traceback (most recent call last):
File "D:\a\paddlepaddle\PPOCRLabel\PPOCRLabel.py", line 3667, in
sys.exit(main())
File "D:\a\paddlepaddle\PPOCRLabel\PPOCRLabel.py", line 3662, in main
app, _win = get_main_app(sys.argv)
File "D:\a\paddlepaddle\PPOCRLabel\PPOCRLabel.py", line 3642, in get_main_app
win = MainWindow(
File "D:\a\paddlepaddle\PPOCRLabel\PPOCRLabel.py", line 213, in init
result = self.table_ocr(
File "D:\a\pythonTool\Anaconda3\envs\paddleocr\lib\site-packages\paddleocr\paddleocr.py", line 926, in call
res, _ = super().call(img, return_ocr_result_in_table, img_idx=img_idx)
File "D:\a\pythonTool\Anaconda3\envs\paddleocr\lib\site-packages\paddleocr\ppstructure\predict_system.py", line 163, in call
res, table_time_dict = self.table_system(
File "D:\a\pythonTool\Anaconda3\envs\paddleocr\lib\site-packages\paddleocr\ppstructure\table\predict_table.py", line 96, in call
structure_res, elapse = self._structure(copy.deepcopy(img))
File "D:\a\pythonTool\Anaconda3\envs\paddleocr\lib\site-packages\paddleocr\ppstructure\table\predict_table.py", line 118, in _structure
structure_res, elapse = self.table_structurer(copy.deepcopy(img))
File "D:\a\pythonTool\Anaconda3\envs\paddleocr\lib\site-packages\paddleocr\ppstructure\table\predict_structure.py", line 140, in call
self.predictor.run()
ValueError: In user code:

InvalidArgumentError: The shape of input[0] and input[1] is expected to be equal.But received input[0]'s shape = [], input[1]'s shape = [1].
  [Hint: Expected inputs_dims[i].size() == out_dims.size(), but received inputs_dims[i].size():1 != out_dims.size():0.] (at ..\paddle/phi/kernels/funcs/concat_funcs.h:55)
  [operator < pd_kernel.phi_kernel > error]

conda新环境下,python 3.10,paddlepaddle已装,一切要求都仔细检查过
这是怎么回事呢?期望有大佬指教下

@GreatV
Copy link
Collaborator

GreatV commented Dec 25, 2024

换一个paddlepaddle版本试试

@tlishi
Copy link
Author

tlishi commented Dec 26, 2024

换成了paddlepaddle 2.6依然闪退,不过我尝试打包成PPOCRLabel.exe可以启动,那就这样使用吧。谢谢你指教

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