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

网络异常 #70

Open
xxllp opened this issue Jun 16, 2016 · 12 comments
Open

网络异常 #70

xxllp opened this issue Jun 16, 2016 · 12 comments

Comments

@xxllp
Copy link

xxllp commented Jun 16, 2016

用户失效后重新登录报错:

WARN:网络故障
INFO: 正在加载配置文件 ...
Traceback (most recent call last):
File "C:/Users/Administrator/PycharmProjects/��Ӱ/���ݽṹ���㷨/auth.py", line 241, in
login()
File "C:/Users/Administrator/PycharmProjects/��Ӱ/���ݽṹ���㷨/auth.py", line 213, in login
form_data = build_form(account, password)
File "C:/Users/Administrator/PycharmProjects/��Ӱ/���ݽṹ���㷨/auth.py", line 115, in build_form
form['_xsrf'] = search_xsrf()
File "C:/Users/Administrator/PycharmProjects/��Ӱ/���ݽṹ���㷨/auth.py", line 101, in search_xsrf
raise NetworkError(u"验证码请求失败")
main.NetworkError
ERROR: 网络异常

这个是网络异常还是登录失败了

@tzhao0311
Copy link

WARN: 网络故障
INFO: 正在加载配置文件 ...
WARN: 帐号信息无效
请输入登录账号:

重新登陆也不行,说是网络故障。

@xxllp
Copy link
Author

xxllp commented Jun 17, 2016

啥意思楼上,你也遇到这个问题了吗

@tzhao0311
Copy link

是的,我也遇到这个问题了,不知道怎么解决呢

@xxllp
Copy link
Author

xxllp commented Jun 20, 2016

第一次还行后面再登录就不行了。

@luckysteven1983
Copy link

url = 'http://www.zhihu.com'
r = requests.get(url, verify=False)
r.status_code
500
知乎把端口封了?

@xxllp
Copy link
Author

xxllp commented Jun 20, 2016

感觉作者的登录写的比较长

@TPeterW
Copy link

TPeterW commented Jun 21, 2016

一样的问题,有人有临时fix吗?

@tzhao0311
Copy link

同求

@KMKL
Copy link

KMKL commented Jun 25, 2016

遇到同样的问题 +1

@yujunhui
Copy link

大家把auth.py里面的所有request.get都传多一个参数 headers=headers 就能解决问题了,headers能在auth.py里面找到

@pjpjq
Copy link

pjpjq commented Jan 14, 2017

楼上什么意思...

@zzz0906
Copy link

zzz0906 commented Mar 5, 2017

request.get都传多一个参数 headers=headers 正解
在每一个函数里都添加一个headers 然后传过去就可以了

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

8 participants