Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

百度OCR API call 失败 #8

Open
airbob opened this issue Jan 13, 2018 · 2 comments
Open

百度OCR API call 失败 #8

airbob opened this issue Jan 13, 2018 · 2 comments

Comments

@airbob
Copy link

airbob commented Jan 13, 2018

tesseract没问题。
Baidu的话API key 和secret key 都设置好了,运行后会遇到如下错误

[error] 识别答案失败,Post https://aip.baidubce.com/rest/2.0/ocr/v1/general_basic?access_token=12.bd6fe5ea478635e5196cb2a4b8e05802.2592000.1518403263.282335-10684168: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
[error] 识别题目失败,Post https://aip.baidubce.com/rest/2.0/ocr/v1/general_basic?access_token=12.bd6fe5ea478635e5196cb2a4b8e05802.2592000.1518403263.282335-10684168: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

查看了下后台,没有API调用, 有人遇到过同样问题吗?

@silenceper
Copy link
Owner

接口请求超时了。
你把这个 https://github.com/silenceper/qanswer/blob/master/ocr/baidu.go#L60 时间调大一点看下.

@airbob
Copy link
Author

airbob commented Jan 13, 2018

@silenceper 谢谢!
调到120还是不可以,我试了其它语言的SDK,可以返回结果,但是response time也是很久。
可能对国外request没有优化吧,我从新加坡request的。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants