haikerapples / timetask

一款支持自定义定时任务的chatgpt-on-wechat插件
MIT License
228 stars 55 forks source link

“执行定时任务,发生了错误:object of type '_io.BytesIO' has no len()” #52

Open MasterKe2003 opened 7 months ago

MasterKe2003 commented 7 months ago

自己开发的插件,函数中会返回一个图片对象,报错“执行定时任务,发生了错误:object of type '_io.BytesIO' has no len()” image 可以看到已经获取到文件对象了 我的插件代码是 image image

starsliao commented 3 months ago

编辑timetask.py 457行 if reply_text is None or len(reply_text) <= 0: 改成 if reply_text is None or len(str(reply_text)) <= 0: