一键生成微信个人专属数据报告报错
i5baobao opened this issue · comments
Traceback (most recent call last):
File "generate_wx_data.py", line 617, in
File "generate_wx_data.py", line 317, in merge_head_image
File "site-packages\PIL\Image.py", line 1817, in resize
File "site-packages\PIL\ImageFile.py", line 239, in load
OSError: image file is truncated (0 bytes not processed)
[8144] Failed to execute script generate_wx_data
重试一次,好了。。。。。
重试一次,好了。。。。。
嗯,为了避免出错,可以添加以下代码:
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
分析的时候显示我有237个好友,结果拼接头像的时候只展示了15*15=225个头像,不满一行被剪掉了。。。
分析的时候显示我有237个好友,结果拼接头像的时候只展示了15*15=225个头像,不满一行被剪掉了。。。
numcol = int(numPic / numrow) # 向下取整
你可以取消向下取整,但是生成的图并不是严格的矩形
thanks! 非python程序员,遇到改代码才能实现的功能,只能是无尽的黑洞-_-|||