Closed PackageInstaller closed 1 year ago
感觉如
https://github.com/X-Skirt-X/nonebot-plugin-watermarker/issues/1#issuecomment-1532640870
所说,本地的图片都不行,但是生成图片有报错但是有部分可以加上水印
本地图片的问题不知道是不是base64解码的问题,之前定位到都是base64出的问题,网络图片的问题的话可能和urllib有关系(((在改了在改了)
网络图片的水印添加已经解决,但是本地图片还是存在可能贴不上的情况,请等待后续我把问题揪出来(
git pull了一下,这下连生成的图都打不上水印了
05-10 13:42:12 [ERROR] nonebot | Error when running CallingAPI hook. Running cancelled! Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-l9AehN_x-py3.9\lib\site-packages\nonebot\adapters\onebot\v11\bot.py", line 174, in send return await bot.send_msg(*params) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-l9AehN_x-py3.9\lib\site-packages\nonebot\internal\adapter\bot.py", line 83, in call_api await asyncio.gather(coros) File "D:\BOT\zhenxun_bot\extensive_plugin\nonebot_plugin_watermarker__init__.py", line 37, in _handle image_size = image.size AttributeError: 'coroutine' object has no attribute 'size' C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py:1890: RuntimeWarning: coroutine 'str2img' was never awaited handle = self._ready.popleft() RuntimeWarning: Enable tracemalloc to get the object allocation traceback +1
05-10 13:42:12 [ERROR] nonebot | Error when running CallingAPI hook. Running cancelled! Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-l9AehN_x-py3.9\lib\site-packages\nonebot\adapters\onebot\v11\bot.py", line 174, in send return await bot.send_msg(*params) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-l9AehN_x-py3.9\lib\site-packages\nonebot\internal\adapter\bot.py", line 83, in call_api await asyncio.gather(coros) File "D:\BOT\zhenxun_bot\extensive_plugin\nonebot_plugin_watermarkerinit.py", line 37, in _handle image_size = image.size AttributeError: 'coroutine' object has no attribute 'size' C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py:1890: RuntimeWarning: coroutine 'str2img' was never awaited handle = self._ready.popleft() RuntimeWarning: Enable tracemalloc to get the object allocation traceback +1
忘记加await了( 现在你再试试
git pull后,只要是涉及图片,终端会卡住,无法做出任何回应(gocq能正常收到信息) 输入exit后才能退出该状态继续回应,但是生成的图没有带上水印,并且再次涉及图片的地方又会卡在这里
草,我忘记删breakpoint了😰
这回应该没有问题了,我在自己的bot上试了一下
git pull后,只要是涉及图片,终端会卡住,无法做出任何回应(gocq能正常收到信息) 输入exit后才能退出该状态继续回应,但是生成的图没有带上水印,并且再次涉及图片的地方又会卡在这里
好也,应该是没问题了
那我closed咯
用的是真寻bot,正确的文件夹路径应该是/home/Neko/Bot/zhenxun_bot/extensive_plugin/nonebot_plugin_watermarker/watermarker_image,但是运行的时候就出现上面的报错
图片如下