EasyTrain icon indicating copy to clipboard operation
EasyTrain copied to clipboard

图形验证码过程报错

Open Fheping opened this issue 1 year ago • 10 comments

正在获取验证码..

        -----------------
        | 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 avatar Sep 21 '23 03:09 Fheping