Skyexu / TopSup

答题辅助决策:头号英雄等答题类游戏
https://www.jianshu.com/p/dc828c4b901d
1.32k stars 351 forks source link

运行时报错 #137

Open liudada2017 opened 6 years ago

liudada2017 commented 6 years ago

大神看一下这个是什么原因,为什么会报这个错,是因为百度api的调用次数超了吗?但是我另一个程序掉的起呢!就这个程序跑不起来

liudada2017 commented 6 years ago

这个是报错代码:

"D:\Program Files (x86)\python\python.exe" E:/Python学习程序/TopSup-master/GetQuestionAndroid.py 采用方式 1 获取截图 Traceback (most recent call last): File "E:/Python学习程序/TopSup-master/GetQuestionAndroid.py", line 37, in question, choices = ocr.ocr_img_baidu(img, config) File "E:\Python学习程序\TopSup-master\common\ocr.py", line 188, in ocr_img_baidu words_result = response['words_result'] KeyError: 'words_result'

Process finished with exit code 1

Skyexu commented 6 years ago

打印 baidu 返回的信息看看吧

liudada2017 commented 6 years ago

我打的 ocr.py中的
response = client.basicGeneral(image_data) print(response)

打印结果:{'error_code': 14, 'error_msg': 'IAM Certification failed'}

是打印这个吗?