steveyg / AnswerHelper

直播答题辅助工具(适用于 冲顶大会/芝士超人/百万赢家/西瓜视频/黄金十秒)
114 stars 47 forks source link

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #7

Open wmonous opened 6 years ago

wmonous commented 6 years ago

请问在修改过语法内括号后,运行时出现标题内错误,这是为什么

steveyg commented 6 years ago

修改了什么地方

wmonous commented 6 years ago

print后面都加了括号,但是现在又报标题的错误了

Traceback (most recent call last): File "main.py", line 10, in result = problem_utils.get_result() File "/Users/qq/answer/AnswerHelper/problem_utils.py", line 56, in get_result return get_chongding_by_api() File "/Users/qq/answer/AnswerHelper/problem_utils.py", line 39, in get_chongding_by_api while(json.loads(req.text)['msg'] != (u"成功")): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

steveyg commented 6 years ago

如果不加括号会出这个问题吗?

wmonous commented 6 years ago

不加括号无法运行,代码里语法不对

steveyg commented 6 years ago

环境什么的都配置正确吗,不加括号(就是你没改动之前)都不能运行?

wmonous commented 6 years ago

我用的是python3.6 和这个有关吗

wmonous commented 6 years ago

另外冲顶的api好像已经用不了了

steveyg commented 6 years ago

需要2.7才行,3.6的话需要改成python3的语法才可以,或者看另一个问题中说的转换一下。 冲顶的api确实不能用了,先用ocr吧,我再找找有没有别的办法