Closed fcc04101405 closed 6 years ago
出现这个说明没问题了,因为那个接口只有答题的时候有数据,所以平时会报这个错误
关于这个错误,我看了源码不是很明白,是什么事件开始出发截屏的呢??? 我们运行main之后,系统系统在干什么呢???
@p1094358629 是这样的,这个脚本分为两个模式,一种是截屏,一种是调接口,出现这个问题是因为接口没有数据导致的,如果是截屏模式,截屏在Img_utils中的spot中调用
@steveyg 我昨天在公司的时候用您的项目,模式是冲顶大会的,当我运行main.py,貌似进程会等待msg,有数据就会直接跳到web。而今天这个如果没有msg,直接报题目这个错???我需要不停的运行main.py,请问这是为什么呢???
@p1094358629 我也发现了这个问题,正在排查中
@steveyg 您这个api 挺有意思的啊,能看下源码吗???
@p1094358629 api是别人提供的,见https://github.com/steveyg/AnswerHelper/issues/1
问题已修复,原因是之前访问太频繁导致报了403错误 修改见https://github.com/steveyg/AnswerHelper/commit/8594421edc059435dd8fb554c84ebc952f0d0b61
好像今天晚上答题接口一直返回没数据
嗯,获取题目的接口好像用不了了,先暂时用ocr的方式吧
/sdcard/screenshot.png: 1 file pulled. 12.0 MB/s (960500 bytes in 0.076s)
Traceback (most recent call last):
File "main.py", line 10, in
靠度娘解决了。。。 改了一下Image.py的tostring方法的代码,注释掉了上面这句,改成了return self.tobytes()
这是库的问题?
好像是,百度好像说得pillow版本3.0以下,以上的好像tostring就不支持。。。
Traceback (most recent call last): File "main.py", line 10, in
result = problem_utils.get_result()
File "/Users/fengchengcheng/Downloads/AnswerHelper-master/problem_utils.py", line 56, in get_result
return get_chongding_by_api()
File "/Users/fengchengcheng/Downloads/AnswerHelper-master/problem_utils.py", line 39, in get_chongding_by_api
while(json.loads(req.text)['msg'] != u"成功"):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
有报错,不知道是咋回事,大神能指导一下么