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

图形验证码过程报错 #15

Open
Fheping opened this issue Sep 21, 2023 · 10 comments
Open

图形验证码过程报错 #15

Fheping opened this issue Sep 21, 2023 · 10 comments

Comments

@Fheping
Copy link

Fheping commented Sep 21, 2023

正在获取验证码..

        -----------------
        | 0 | 1 | 2 | 3 |
        -----------------
        | 4 | 5 | 6 | 7 |
        ----------------- 

输入验证码索引(见上图,以','分割): 2,7
captchaResult: 180,40,250,110
captchaCheck: {'result_message': '验证码校验成功', 'result_code': '4'}
核验方式不正确!
核验方式不正确!
正在获取验证码..
Traceback (most recent call last):
File "/Users/fengheping/Desktop/mySpace/work/pros/EasyTrain/easytrain.py", line 48, in
main()
File "/Users/fengheping/Desktop/mySpace/work/pros/EasyTrain/easytrain.py", line 16, in main
result, msg = login.login(USER_NAME, USER_PWD)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/fengheping/Desktop/mySpace/work/pros/EasyTrain/train/login/Login.py", line 64, in login
result, msg = self._login(userName, userPwd, type=(count % 2))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/fengheping/Desktop/mySpace/work/pros/EasyTrain/train/login/Login.py", line 17, in wrapper
reslut, msg = func(*args, **kw)
^^^^^^^^^^^^^^^^^
File "/Users/fengheping/Desktop/mySpace/work/pros/EasyTrain/train/login/Login.py", line 73, in _login
return self._loginAsyncSuggest(userName, userPwd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/fengheping/Desktop/mySpace/work/pros/EasyTrain/train/login/Login.py", line 106, in _loginAsyncSuggest
results, verify = Captcha().verifyCaptchaByHand(type=TYPE_LOGIN_OTHER_WAY)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/fengheping/Desktop/mySpace/work/pros/EasyTrain/train/login/Capthca.py", line 69, in verifyCaptchaByHand
img = Image.open(BytesIO(self.getCaptcha(type)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/PIL/Image.py", line 3280, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x10d76bfb0>

@Fheping
Copy link
Author

Fheping commented Sep 21, 2023

能看下这种是哪儿的问题么 图形码入参正确 请求ok 后续callback的时候抛出的

@Fheping
Copy link
Author

Fheping commented Sep 21, 2023

核验方式不正确! 是12306不让这么验证么

@fansea0
Copy link

fansea0 commented Sep 23, 2023

我也是这种情况,请问你解决了吗

@VV1314
Copy link

VV1314 commented Oct 3, 2023

+1

@huangzz1226
Copy link

我也是这种情况,有人解决了吗

@chujiawei123
Copy link

我也是这种情况

@igotyback
Copy link

我的错误
image

@igotyback
Copy link

也不报错

@Kiritoyh42
Copy link

核验方式不正确

@igotyback
Copy link

核验方式不正确怎末解决呢?

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

7 participants