Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONDecodeError #31

Open
Josoen opened this issue Aug 3, 2023 · 3 comments
Open

JSONDecodeError #31

Josoen opened this issue Aug 3, 2023 · 3 comments

Comments

@Josoen
Copy link

Josoen commented Aug 3, 2023

2023-08-03T04:07:01Z Start load request '9fc0c6ff-f871-4d0d-b8db-caaeb4430a38', version: latest
2023-08-03T04:07:01Z Finish load request '9fc0c6ff-f871-4d0d-b8db-caaeb4430a38', duration: 10.815ms, memory used: 44.168MB.
2023-08-03T04:07:01Z Start invoke request 'fb22b3da-e3de-4782-9a3a-3262c383ce48', version: latest
2023-08-03 04:07:01 INFO Start getting super topic follow list
2023-08-03 04:07:01 INFO Start forming requests params
2023-08-03 04:07:08 INFO page 1 get data success
2023-08-03 04:07:16 ERROR Traceback (most recent call last):
  File "/home/snuser/runtime/python3.6/functionmanager.py", line 404, in invoke_function
    func_response = self.instance(event, ctx)
  File "/opt/function/code/index.py", line 6, in handler
    follow_list = supertopic.get_follow_list()
  File "/opt/function/code/supertopicsign.py", line 74, in get_follow_list
    if response.json().get('errno') == -100:
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/site-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/site-packages/simplejson/__init__.py", line 514, in loads
    return _default_decoder.decode(s)
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/site-packages/simplejson/decoder.py", line 386, in decode
    obj, end = self.raw_decode(s)
  File "/opt/function/runtime/python3.6/rtsp/python/lib/python3.6/site-packages/simplejson/decoder.py", line 416, in raw_decode
    return se
2023-08-03T04:07:16Z fb22b3da-e3de-4782-9a3a-3262c383ce48 ERROR function invocation exception, error: catch a 'JSONDecodeError' exception(Expecting value: line 1 column 1 (char 0))
Traceback (most recent call last):
  File "./index.py", line 6, in handler
    follow_list = supertopic.get_follow_list()
  File "./supertopicsign.py", line 74, in get_follow_list
    if response.json().get('errno') == -100:
  File "${PYTHONHOME}/site-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "${PYTHONHOME}/site-packages/simplejson/__init__.py", line 514, in loads
    return _default_decoder.decode(s)
  File "${PYTHONHOME}/site-packages/simplejson/decoder.py", line 386, in decode
    obj, end = self.raw_decode(s)
  File "${PYTHONHOME}/site-packages/simplejson/decoder.py", line 416, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-08-03T04:07:16Z Finish invoke request 'fb22b3da-e3de-4782-9a3a-3262c383ce48'(invoke Failed), duration: 14346.874ms, billing duration: 14347ms, memory used: 47.383MB, billing memory: 10240MB, cpu used: 0.036U

试了好几次,每次签到进度都不一样,有时能签几个就不行了,有时读取签到列表都没完成,好像是json数据解析的错误?重新抓取了一遍cookie没有效果
希望大佬看看是什么问题

@Josoen
Copy link
Author

Josoen commented Aug 3, 2023

1691037307123
成功率不一定,刚发现这个问题

@Hellager
Copy link
Owner

Hellager commented Aug 6, 2023

可能触发验证码了,可以本地跑一下看看具体的请求返回信息
真的是验证码的问题的话目前没什么解决办法,出现验证码的原因和账户有关
云函数用不起来又没办法自己折腾青龙面板的话,如果你是 ios 用户可以看看这个 超话一键签到,通过捷径实现的,如果你能保证每天都会用到 PC 浏览器的话可以试 魂签,想用魂签但不会写脚本的话可以邮箱联系我,发一份资料给你,照着做基本也能实现,就是前期比较麻烦

@SkyeBeFreeman
Copy link

@Hellager 获取用户名的响应体长这样,然后json解析不了了。
image

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

No branches or pull requests

3 participants