MeetWq / meme-generator

表情包生成器,用于制作各种沙雕表情包
MIT License
508 stars 72 forks source link

module 'PIL.Image' has no attribute 'ANTIALIAS' #117

Closed shirohako closed 3 months ago

shirohako commented 3 months ago

coupon 这个表情报错

PS C:\Users\ame\Desktop\文件\meme-generator> python -m meme_generator.cli make coupon --images 111.png --text 帮白券
07-25 02:05:03 [INFO] meme_generator.log | Config file path: C:\Users\ame\AppData\Roaming\meme_generator\config.toml
Traceback (most recent call last):
  File "C:\Users\ame\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\ame\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\ame\Desktop\文件\meme-generator\meme_generator\cli.py", line 200, in <module>
    main()
  File "C:\Users\ame\Desktop\文件\meme-generator\meme_generator\cli.py", line 185, in main
    print(generate_meme(key, images, texts, kwargs))  # noqa: T201
  File "C:\Users\ame\Desktop\文件\meme-generator\meme_generator\cli.py", line 150, in generate_meme
    result = loop.run_until_complete(meme(images=images, texts=texts, args=args))
  File "C:\Users\ame\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete
    return future.result()
  File "C:\Users\ame\Desktop\文件\meme-generator\meme_generator\meme.py", line 144, in __call__
    return await run_sync(cast(Callable[..., BytesIO], self.function))(**values)
  File "C:\Users\ame\Desktop\文件\meme-generator\meme_generator\utils.py", line 48, in _wrapper
    result = await loop.run_in_executor(None, pfunc)
  File "C:\Users\ame\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\ame\Desktop\文件\meme-generator\meme_generator\memes\coupon\__init__.py", line 12, in coupon
    img = images[0].convert("RGBA").circle().resize((60, 60))
  File "C:\Users\ame\AppData\Local\Programs\Python\Python310\lib\site-packages\pil_utils\build_image.py", line 156, in circle
    mask = mask.resize(image.size, Image.ANTIALIAS)
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
MeetWq commented 3 months ago

更新一下 pil_utils