验证码识别不出来 出现cannot write mode RGBA as JPEG
回答
收藏

验证码识别不出来 出现cannot write mode RGBA as JPEG

s
skymao
2024-04-16 15:19·浏览量:585
s
skymao
发布于 2024-04-16 15:19585浏览

验证码识别报错,Traceback (most recent call last):

 File "/Applications/影刀.app/Contents/Resources/app/node_modules/xbot-engine/lib/lib/python3.7/site-packages/PIL/JpegImagePlugin.py", line 630, in _save

   rawmode = RAWMODE[im.mode]

KeyError: 'RGBA'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

 File "/Applications/影刀.app/Contents/Resources/app/node_modules/xbot-engine/lib/lib/python3.7/runpy.py", line 193, in _run_module_as_main

   "__main__", mod_spec)

 File "/Applications/影刀.app/Contents/Resources/app/node_modules/xbot-engine/lib/lib/python3.7/runpy.py", line 85, in _run_code

   exec(code, run_globals)

 File "/Applications/影刀.app/Contents/Resources/app/node_modules/xbot-engine/lib/lib/python3.7/site-packages/xbot_interpreter.py", line 94, in <module>

   main()

 File "/Applications/影刀.app/Contents/Resources/app/node_modules/xbot-engine/lib/lib/python3.7/site-packages/xbot_interpreter.py", line 58, in main

   mod.main(args)

 File "/Users/qixing/Library/Application Support/Shadowbot/users/74475178962464770/apps/a857e2c4-6bac-49b9-a85f-e882775edec8/xbot_robot/main.py", line 431, in main

   captcha_result = xbot_visual.web_service.captcha(engine_type="shadowbot", username=None, password=None, captcha_type="1003", third_party_code="ttshitu_1003_predict", image_source="web_element", image_file=None, image_browser=web_page_kanchai, image_web_selector=package.selector("图片_seccodeimg2"), image_window="0", image_win_selector=None, image_region_x1=None, image_region_y1=None, image_region_x2=None, image_region_y2=None, imageback_source="screen", back_image_file=None, imageback_browser=None, imageback_web_selector=None, imageback_window="0", imageback_win_selector=None, imageback_region_x1=None, imageback_region_y1=None, imageback_region_x2=None, imageback_region_y2=None, typename=None, is_to96dpi=True, remark=None, _block=("main", 140, "验证码识别"))

 File "<string>", line 89, in wrapper

 File "<string>", line 84, in wrapper

 File "<string>", line 799, in captcha

 File "/Applications/影刀.app/Contents/Resources/app/node_modules/xbot-engine/lib/lib/python3.7/site-packages/PIL/Image.py", line 2320, in save

   save_handler(self, fp, filename)

 File "/Applications/影刀.app/Contents/Resources/app/node_modules/xbot-engine/lib/lib/python3.7/site-packages/PIL/JpegImagePlugin.py", line 632, in _save

   raise OSError(f"cannot write mode {im.mode} as JPEG") from e

OSError: cannot write mode RGBA as JPEG

有明白的大佬,麻烦帮忙看看,谢谢啦

收藏
全部回答1
最新
发布回答
回答