Giter Club home page Giter Club logo

nonebot_plugin_quote's People

Contributors

rongrongji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

wanghaisheng

nonebot_plugin_quote's Issues

UnicodeEncodeError

系统信息:
Windows Server 2019 Datacenter + Python3.10
上传图片如下:
E2578A4B-A0C7-4116-8977-C6B97B95CB2F
疑似错误字符:【】这个括号
报错如下:

03-26 20:58:16 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_quote)
03-26 20:58:18 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_quote) running complete
03-26 20:58:18 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_quote) failed.
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\NoneBot\GZbot2\bot.py", line 36, in <module>
    nonebot.run(app="__mp_main__:app")
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\__init__.py", line 273, in run
    get_driver().run(*args, **kwargs)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\drivers\fastapi.py", line 187, in run
    uvicorn.run(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\main.py", line 569, in run
    server.run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\server.py", line 60, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
    super().run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 603, in run_forever
    self._run_once()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1906, in _run_once
    handle._run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 141, in _check_matcher
    await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
> File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 187, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher\matcher.py", line 732, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher\matcher.py", line 707, in simple_run
    await handler(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\dependencies\__init__.py", line 108, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_quote\__init__.py", line 104, in record_upload
    json.dump(inverted_index, fc, indent=2, separators=(',',': '), ensure_ascii=False)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 180, in dump
    fp.write(chunk)
UnicodeEncodeError: 'gbk' codec can't encode character '\xdf' in position 1: illegal multibyte sequence

需要在RECORD_PATH和INVERTED_INDEX_PATH中路具体要怎么写?

需要在RECORD_PATH和INVERTED_INDEX_PATH中手动创建两个json文件 这段不止到出了啥岔子了,换了好几个写法都提示路径填写错误或找不到文件。想问问标准写法是什么?

另外,QUOTE_SUPERUSER里必须分群设置管理员qq号么?有没有全局的设置的?

一个建议

参考copy_images_files函数,应该可以在保存图片的时候直接保存到用户设定好的image_path,例如bot/resources/image/,这样应该会更便于用户管理资源以及对接其他插件功能

删除指令似乎无法触发

.env 配置文件:
COMMAND_START=[“.”]
后台无ERROR报错,均是nonebot_plugin_quote running complete
截图:
9CE9458D-A34D-49C9-B04F-A5998C9A89B2

两个建议

  1. 建议添加图片库文件夹,以便大批量迁移原有的语录;
  2. 建议添加指定某个发送者的语录的功能(图片库可以以发送者为分类来设置文件夹)

【功能建议】上传取消指令

如果在触发了上传指令后想要退出上传进程,似乎没有指令可以做到(?)而且bot会每条消息都回复让他上传图片形式…>_<…
希望能加一个取消上传的指令,可以取消上传,感谢!

一个建议

能否在上传语录时就为其添加标签
目前添加tag似乎需要Bot将语录发出,可如果语录存储较多,为特点语录添加tag是不是较为困难

【功能建议】指令前缀

可以给quote插件单独加个前缀嘛(*≧ω≦)通过.env 配置,默认空
原因:部分指令(addtag)与部分插件(ELF_RSS)的指令冲突了 也是为了防止误触发。
感谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.