455 Star 3.5K Fork 865

PaddlePaddle / PaddleOCR

 / 详情

PaddleHub Serving的服务部署后,执行报错。

待办的
创建于  
2021-03-18 09:34

如下链接的文档有问题,望修改:
https://gitee.com/paddlepaddle/PaddleOCR/tree/release/2.0/deploy/hubserving
部署ocr_system完成后,执行访问指令python tools/test_hubserving.py http://127.0.0.1:8868/predict/ocr_system doc/imgs/ 报错
[2021/03/18 09:22:57] root INFO: Predict time of doc/imgs/1.jpg: 10.189s
Traceback (most recent call last):
File "tools/test_hubserving.py", line 117, in
main(server_url, image_path)
File "tools/test_hubserving.py", line 91, in main
res = r.json()["results"][0]
IndexError: string index out of range

评论 (13)

HRobbie 创建了任务
HRobbie 关联仓库设置为PaddlePaddle/PaddleOCR
展开全部操作日志

大佬,你这边这个问题解决了么

我也刚好碰到这种问题了,蛮想知道大佬们怎么解决的

我这边是解决了,时间过去蛮久 我要找找资料才行

不用啦谢谢,我也解决啦

怎么解决的,我现在也越大哦这个问题了,部署成功了,但是执行python tools/test_hubserving.py http://127.0.0.1:8868/predict/ocr_system doc/imgs/ 报错res = r.json()["results"][0]
IndexError: string index out of range

我也碰到了,有解决方案吗

解决了吗
paddlepaddle 2.3.0
paddleocr 2.6.1.3
paddlehub 2.2.0

我也碰到了相同的问题。
在test_hubserving.py中输出了一下错误
是下面这句
r = requests.post(url=url, headers=headers, data=json.dumps(data))
执行的时候出错了。
我输出了一下结果: logger.info(r.json())
得到下面的错误:
test_hubserving.py:91 - {'msg': "module 'numpy' has no attribute 'int'.\nnp.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.\nThe aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations", 'results': '', 'status': '101'}

这下一步就不知道怎么修改了。
谁能进一步解决一下呢?

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(11)
9463003 love to climb 1676602843
Python
1
https://gitee.com/paddlepaddle/PaddleOCR.git
git@gitee.com:paddlepaddle/PaddleOCR.git
paddlepaddle
PaddleOCR
PaddleOCR

搜索帮助

53164aa7 5694891 3bd8fe86 5694891