testerSunshine / 12306

12306智能刷票,订票
MIT License
33.88k stars 9.79k forks source link

启动错误 #584

Closed HackenPai closed 4 years ago

HackenPai commented 4 years ago

描述问题

url: /passport/web/login返回参数为空, 接口状态码: 302
url: /passport/web/login返回参数为空, 接口状态码: 302
url: /passport/web/login返回参数为空, 接口状态码: 302
url: /passport/web/login返回参数为空, 接口状态码: 302
url: /passport/web/login返回参数为空, 接口状态码: 302
Traceback (most recent call last):
  File "run.py", line 22, in <module>
    select_ticket_info.select().main()
  File "C:\Users\xiaobai\Desktop\12306\init\select_ticket_info.py", line 123, in main
    self.call_login()
  File "C:\Users\xiaobai\Desktop\12306\init\select_ticket_info.py", line 117, in call_login
    self.login.go_login()
  File "C:\Users\xiaobai\Desktop\12306\init\login.py", line 129, in go_login
    uamtk = self.baseLogin(user, passwd)
  File "C:\Users\xiaobai\Desktop\12306\init\login.py", line 66, in baseLogin
    tresult = self.session.httpClint.send(logurl, loginData)
  File "C:\Users\xiaobai\Desktop\12306\myUrllib\httpUtils.py", line 185, in send
    response.content.decode() if isinstance(response.content, bytes) else response.content)
  File "D:\Programs\Python\Python37\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "D:\Programs\Python\Python37\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "D:\Programs\Python\Python37\lib\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)

重现步骤

按照git上的安装步骤操作完后,执行到启动服务python3 run.py r后出现该错误。

截图&日志 1 环境信息

额外的备注

wangneal commented 4 years ago

重启一下,我之前也遇到过。这是因为网络问题导致的

Yihaoer commented 4 years ago

看报错信息 往上面拉

HackenPai commented 4 years ago

重启之后也是一样的错误

Yihaoer commented 4 years ago

打开配置文件,全局搜RAIL_DEVICEID字段,看这里注释,估计是这里没改

Xiaomao136 commented 4 years ago

重启应该没关系,应该是作者没有作302重定向的处理

Xiaomao136 commented 4 years ago

@Yihaoer 应该我用的cookie_type=1,账号登录成功,那就说明需要的cookie是正确获取到了

HackenPai commented 4 years ago

多谢各位大神提示