PaddleX icon indicating copy to clipboard operation
PaddleX copied to clipboard

PP-StructureV3 服务端报错 500,layoutParsingResults 格式错误

Open Sisphyus opened this issue 5 months ago • 3 comments
trafficstars

Checklist:

描述问题

复现

  1. 服务化部署

    • 您是否完全按照服务化部署文档教程跑通了流程?

    • 您在服务化部署中是否有使用高性能推理插件? 没有

    • 您使用了哪一种服务化部署方案? 高稳定性服务化部署,并且使用了官方镜像 ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:paddlex3.0.1-gpu 部署使用了官方 sdk paddlex_hps_PP-StructureV3_sdk,服务正常启动没有报错。 部署命令 docker run -itd -e PADDLEX_HPS_DEVICE_TYPE=gpu -v ~/paddlex_hps_PP-StructureV3_sdk/fonts:/root/.paddlex/fonts -v ~/paddlex_hps_PP-StructureV3_sdk/official_models:/root/.paddlex/official_models -v "$(pwd)":/app -w /app --rm --gpus all --init --network host --shm-size 8g harbor.minum.cloud/pub/paddlex/hps:paddlex3.0.1-gpu /bin/bash server.sh (我手动挂载了模型和字体文件以支持离线场景)

  2. 请提供您出现的报错信息及相关log 使用 sdk 中的 client.py 调用本地测试 pdf 文件进行解析时报错 Creating model: ('PP-LCNet_x1_0_doc_ori', None) Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in /root/.paddlex/official_models. Creating model: ('PP-OCRv5_server_det', None) Using official model (PP-OCRv5_server_det), the model files will be automatically downloaded and saved in /root/.paddlex/official_models. Creating model: ('PP-OCRv5_server_rec', None) Using official model (PP-OCRv5_server_rec), the model files will be automatically downloaded and saved in /root/.paddlex/official_models. [ ERROR] [2025-06-09 06:46:47,651] [36a01377bf5b41b6977dcb305097ed5d] [cd80cc74-c9e0-4b1b-a0f8-46e1441b1b40] - Unhandled exception Traceback (most recent call last): File "/paddlex/py310/lib/python3.10/site-packages/paddlex_hps_server/base_model.py", line 88, in execute result_or_output = self.run(input_, log_id) File "/paddlex/var/paddlex_model_repo/layout-parsing/1/model.py", line 168, in run return schemas.pp_structurev3.InferResult( File "/paddlex/py310/lib/python3.10/site-packages/pydantic/main.py", line 214, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) pydantic_core._pydantic_core.ValidationError: 4 validation errors for InferResult layoutParsingResults.1.markdown.isStart Input should be a valid boolean [type=bool_type, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.10/v/bool_type layoutParsingResults.1.markdown.isEnd Input should be a valid boolean [type=bool_type, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.10/v/bool_type layoutParsingResults.3.markdown.isStart Input should be a valid boolean [type=bool_type, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.10/v/bool_type layoutParsingResults.3.markdown.isEnd Input should be a valid boolean [type=bool_type, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.10/v/bool_type

相同文件在官网运行也不行

Image

原始文件

a1.pdf

环境

  1. 请提供您使用的PaddlePaddle、PaddleX版本号、Python版本号 官方镜像 ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlex/hps:paddlex3.0.1-gpu

  2. 请提供您使用的操作系统信息,如Linux/Windows/MacOS linux ubuntu 24.04

  3. 请问您使用的CUDA/cuDNN的版本号是?

Sisphyus avatar Jun 09 '25 07:06 Sisphyus