Giter VIP home page Giter VIP logo

amiya-bot-plugins's People

Contributors

evative7 avatar hsyhhssyy avatar kkss01 avatar vivien8261 avatar yige233 avatar zhaozuohong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

amiya-bot-plugins's Issues

【优化建议】改变现有的定期维护逻辑

建议

很多用户,包括我,均遇到过这样一件邪门事儿:一切看起来都正常,也没有报错,但自动维护莫名其妙就挂了,导致各种数据没有及时刷新。
受限于个人水平,我认为这种错误是较难排查并解决的。那么,直接换个逻辑好了。
提供一个 HTTP API 用于进行维护,这个 API 被访问则立刻执行一次维护。这样便可以用系统的定时任务甚至是第三方的定时任务来确保维护按预期工作。
当然,这个 API 最好提供鉴权,否则意外的被滥用就惨了。建议提供 GET 或 POST 可选的鉴权方式,甚至是 IP 黑白名单,方便灵活应用。

微博推送插件2.5出现不影响使用(?)的ERROR,

问题描述

微博推送插件2.5ERROR
Cache_2f636d52d0aacc46
Cache_-2a158705260e768f
群友也出现了
12410471bea939080f595c95e3266b15

复现

安装微博推送插件,或者已经安装微博推送插件的情况下每次重新启动兔兔。都会蹦出这一段错误,但似乎无影响(?)

Amiya-Bot 版本

v6.2.7

其他插件版本

无其它插件

日志

2023-09-20 17:36:38,287 Main] INFO] checking assets update...
2023-09-20 17:36:38,493 [ Main][ ERROR] assets version file requestfailed.
Unable to find local data/json file or could not parse the contents using importlib-resources. Try pkg-resource next. Traceback(most recent calllast)
File"fake_useragent\utils.py”,line 27, in load
File importlib resources\common.py line 46, in wrapper
File importlib resources common. py, line 56, in files
File functools.py,line 875. in wrapper
File importlibresourcescommon.DV. line 82, in
File "importlib\init_.py”, line 127, in import_module
File Kfrozen importlib.bootstrap line1014, in gcd_import
File"<frozenimportlib.bootstrap)m line 991, infind and load
File"<frozen importlib.bootstrap line 973.in _find_and_load_unlocked
ModuleNotFoundError:No module named fake useragent.data
Could not find localdata/json file or could not parse the contents using pkg-resource.
Traceback(most recent calllast):
File fake useragent\utils.py , line 27, in load
File importlib resources common.py line 46, in wrapper
File importlib resourcescommon.DV.line 56, in files
File functools.py,line 875,in wrapper
File importlib_resourcescommon.py line 82, in
File importlib\ init .py",line 127, in import module
File<frozen importlib.bootstrap. line1014, in gcd import
File <frozen importlib. bootstrap line 991. in find and load
File<frozen importlib.bootstrap line973, in _find_and_load_unlocked
ModuleNotFoundError:No module named fake_useragent.data
During handling of the above exception, another exception occurred:
fTraceback(most recent calllast):
Filefake useragent\utils.pv line 40, in load
FileNotFoundError: [Errno 2]No such file or directory:'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2\\_MEI20242\\fake_useragent\\data\\browsers.json MainlI
2023-09-20 17:36:38.892 INFO]plugin loaded:amiyabot-weibo-2.5.zip
2023-09-20 17:36:38.897 Main INFO plugin installed:amiyabot-weibo
2023-09-2017:36:38.898 Mainl INFO successfully installed l plugin(s).
2023-09-2017:36:38.962 Server] INFO] Started server process[3728]
2023-09-20 17:36:38,964 ServerJL INFO] Waitingfor applicationstartup.

补充信息

No response

插件配置无法加载以及手动修改后无法读取url

默认安装时会出错

File "C:\app\Git\Amiya-Bot\amiya\lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\app\Git\Amiya-Bot\amiya\lib\site-packages\starlette\routing.py", line 72, in app response = await func(request) File "C:\app\Git\Amiya-Bot\amiya\lib\site-packages\fastapi\routing.py", line 299, in app raise e File "C:\app\Git\Amiya-Bot\amiya\lib\site-packages\fastapi\routing.py", line 294, in app raw_response = await run_endpoint_function( File "C:\app\Git\Amiya-Bot\amiya\lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function return await dependant.call(**values) File "C:\app\Git\Amiya-Bot\core\server\plugin.py", line 95, in get_plugin_default_config return app.response(plugin.get_config_defaults()) File "C:\app\Git\Amiya-Bot\core\plugins\customPluginInstance\amiyaBotPluginInstance.py", line 247, in get_config_defaults 'global_config_schema': json.dumps(self.__get_dynamic_global_config_schema()), File "C:\app\Git\Amiya-Bot\core\plugins\customPluginInstance\amiyaBotPluginInstance.py", line 240, in __get_dynamic_global_config_schema return self.__parse_to_json(self.__global_config_schema) File "C:\app\Git\Amiya-Bot\core\plugins\customPluginInstance\amiyaBotPluginInstance.py", line 256, in _parse_to_json value = value() File "C:\app\Git\Amiya-Bot\plugins\amiyabot-blm-library-1_2_1\main.py", line 18, in dynamic_get_global_config_schema_data data = json.load(file) File "C:\ProgramData\Anaconda3\lib\json_init.py", line 293, in load return loads(fp.read(), UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 131: illegal multibyte sequence

在手动修改main中代码为这个后不再报错
with open(file_path, 'r', encoding='utf-8') as file:
data = json.load(file)

能正常加载配置后填写url时看日志是无法读取,
图片
url为none
然后显示
图片

插件管理卸载插件时允许保留配置文件

功能描述

同标题,十分简单,我认为不需要更多的描述。

优点

这可以避免在某些时候需要重装插件时丢失配置。

实现

1.简易、兼容性好的方案
检查插件目录下所有 yaml 文件,如果选择保留配置则保留这些文件。这要求开发者将 yaml 配置作为规范并遵守。
2.更安全、更准确但可能具有破坏性的方案
要求插件提供配置文件(目录),保留插件声明的这个文件(目录)。
3.较为平衡的方案
可以综合以上两点,当声明存在时给出保留选项,而不存在时不给出这个选项。当然,可以给出一个”开发者模式“或者类似的东西,在"开发者模式"下卸载插件使用方案 1 处理配置。

大帝挑战对种族未公开的处理不妥当

问题描述

小莫和年算作了同一种族,因为都是未公开
震撼我一整年啊一整年
截图

复现

抽到了谜底是种族未公开的干员即可复现

Amiya-Bot 版本

主分支 commit 3295a2a

其他插件版本

日志

这不用日志

补充信息

上文已描述详尽

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.