noneplugin / nonebot-plugin-memes

Nonebot2 表情包制作插件
MIT License
224 stars 20 forks source link

无法使用滚屏命令 #6

Closed he0119 closed 2 years ago

he0119 commented 2 years ago

使用时,会无法保存文件。

05-24 17:31:11 [INFO] nonebot | Event will be handled by <Matcher from nonebot_plugin_memes, type=message, priority=13, temp=False>
05-24 17:31:11 [WARNING] nonebot_plugin_memes | Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_memes/__init__.py", line 56, in handle
    res = await meme.func(texts)
  File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_memes/normal_meme.py", line 170, in make_scroll
    dialog_left = await load_image("scroll/0.png")
  File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_memes/functions.py", line 42, in load_image
    image = await get_image(name)
  File "/usr/local/lib/python3.9/site-packages/aiocache/decorators.py", line 93, in wrapper
    return await self.decorator(f, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/aiocache/decorators.py", line 108, in decorator
    result = await f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_memes/download.py", line 47, in get_image
    return await get_resource("images", name)
  File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_memes/download.py", line 38, in get_resource
    with file_path.open("wb") as f:
  File "/usr/local/lib/python3.9/pathlib.py", line 1252, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/usr/local/lib/python3.9/pathlib.py", line 1120, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'data/memes/images/scroll/0.png'
MeetWq commented 2 years ago

奇怪,为什么写模式会FileNotFoundError

he0119 commented 2 years ago

奇怪,为什么写模式会FileNotFoundError

我稍微看了一下,应该是你只检查了 data/memes/images/ 文件夹是否存在,没有检查 data/memes/images/scroll/

yoiyami96 commented 2 years ago

我今天也遇到了这个问题,只有滚屏表情无法使用,但是没有任何报错,[INFO] nonebot | Event will be handled by <Matcher from nonebot_plugin_memes, type=message, priority=13, temp=False>后面就没了

chenyue314 commented 2 years ago

我今天也遇到了这个问题,只能滚屏表情无法使用,没有但是报错,[INFO] nonebot | 事件将由 <Matcher from nonebot_plugin_memes, type=message, priority=3, temp=False> 处理了

如果有安装petpet /滚屏 和petpet的 /滚 冲突,两个改一个这样 C:\Users\18749\AppData\Local\Programs\Python\Python310\Lib\site-packages\nonebot_plugin_memes里面的normal_meme.py 改滚屏成刷屏就行

yoiyami96 commented 2 years ago

我今天也遇到了这个问题,只能滚屏表情无法使用,没有但是报错,[INFO] nonebot | 事件将由 <Matcher from nonebot_plugin_memes, type=message, priority=3, temp=False> 处理了

如果有安装petpet /滚屏 和petpet的 /滚 冲突,两个改一个这样 C:\Users\18749\AppData\Local\Programs\Python\Python310\Lib\site-packages\nonebot_plugin_memes里面的normal_meme.py 改滚屏成刷屏就行

好,有用!谢谢

MeetWq commented 2 years ago

试试新版本