Skip to content

Conversation

@scyyh11
Copy link
Collaborator

@scyyh11 scyyh11 commented Nov 15, 2025

修复 PaddlePaddle/PaddleOCR#17068

问题现象

AttributeError: 'numpy.ndarray' object has no attribute 'append'

问题原因

layout_det_res["boxes"] 在前序流程中被包装成了 ndarray,但后续逻辑仍然按列表调用 layout_det_res["boxes"].append(...),导致报错。

解决方案

在调用 append 之前,将 layout_det_res["boxes"]ndarray 显式还原为 list,保证后续 append 调用正常执行。

@paddle-bot
Copy link

paddle-bot bot commented Nov 15, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant