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

[BUG]京东二维码登陆调用报错 #88

Open
PaPaB1 opened this issue Nov 27, 2022 · 2 comments
Open

[BUG]京东二维码登陆调用报错 #88

PaPaB1 opened this issue Nov 27, 2022 · 2 comments

Comments

@PaPaB1
Copy link

PaPaB1 commented Nov 27, 2022

Environment (使用环境)

  • Operating system (操作系统): mac os
  • Python version (Python版本): 3.11.0

Question description (问题描述)

You can visit https://github.com/CharlesPikachu/DecryptLogin for more details.
Traceback (most recent call last):
  File "Documents/PythonTest/Test001.py", line 4, in <module>
    infos_return, session = lg.jingdong('', '', 'scanqr')
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/DecryptLogin/modules/core/jingdong.py", line 128, in login
    return selected_api.login(**args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/DecryptLogin/modules/core/jingdong.py", line 51, in login
    showImage(qrcode_path)
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/DecryptLogin/modules/utils/misc.py", line 20, in showImage
    img.show()
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/Image.py", line 2407, in show
    _show(self, title=title)
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/Image.py", line 3411, in _show
    ImageShow.show(image, **options)
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/ImageShow.py", line 62, in show
    if viewer.show(image, title=title, **options):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/ImageShow.py", line 86, in show
    return self.show_image(image, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/ImageShow.py", line 112, in show_image
    return self.show_file(self.save_image(image), **options)
                          ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/ImageShow.py", line 108, in save_image
    return image._dump(format=self.get_format(image), **self.options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/Image.py", line 621, in _dump
    self.save(filename, format, **options)
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/Image.py", line 2353, in save
    save_handler(self, fp, filename)
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/PngImagePlugin.py", line 1218, in _save_all
    _save(im, fp, filename, save_all=True)
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/PngImagePlugin.py", line 1395, in _save
    _write_multiple_frames(im, fp, chunk, rawmode, default_image, append_images)
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/PngImagePlugin.py", line 1113, in _write_multiple_frames
    im_frame = im_frame.convert(rawmode)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yangwei/Documents/PythonTest/venv/lib/python3.11/site-packages/PIL/Image.py", line 1063, in convert
    im = self.im.convert(mode, dither)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: conversion not supported

Screenshot (报错截图)
image

Advice (修复建议)
貌似图片解析错误

@hsyysy
Copy link

hsyysy commented Dec 2, 2022

我发现直接用PIL的Image库打开本地的qrcode.png也是一样的错误

@xiaoyunjie
Copy link

@PaPaB1 pip3 install Pillow==8.4.0 降低Pillow版本可以解决此问题

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

3 participants