Closed lunana123 closed 4 years ago
请问这个问题怎么解决呢 @cclauss @
这个是返回的不是json,应该是ip出了问题
哪里的IP 问题 怎么修改啊
查看内容 ,返回b‘helao world’,不是json。报错在decode here。 response.content.decode() if isinstance(response.content, bytes) else response.content) ` 不过重复允许r几次就可以登陆成功。
Traceback (most recent call last): File "run.py", line 22, in
select_ticket_info.select().main()
File "/Users/nana.lu/Downloads/12306/init/select_ticket_info.py", line 123, in main
self.call_login()
File "/Users/nana.lu/Downloads/12306/init/select_ticket_info.py", line 117, in call_login
self.login.go_login()
File "/Users/nana.lu/Downloads/12306/init/login.py", line 129, in go_login
uamtk = self.baseLogin(user, passwd)
File "/Users/nana.lu/Downloads/12306/init/login.py", line 66, in baseLogin
tresult = self.session.httpClint.send(logurl, loginData)
File "/Users/nana.lu/Downloads/12306/myUrllib/httpUtils.py", line 185, in send
response.content.decode() if isinstance(response.content, bytes) else response.content)
File "//anaconda3/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "//anaconda3/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "//anaconda3/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)