drinkoolongtea / splatoon2-bot Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
我在尝试启动插件或使用任意指令时,提示:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.local/lib/python3.10/site-packages/splatoon2_tools/resource/ARMS_Institute.png'
插件在尝试读取ARMS_Institute.png,也就是隔壁ARMS Wiki的logo图片。
看了一眼Inkipedia页脚部分,发现正好这个ARMS Wiki就在底部友情链接的第一位,也就是说这个插件在寻找本来不需要寻找的图片,但由于仓库图片库根本不会有这些别的游戏的Wiki的图片,所以直接报错不工作。也许是网页抓取规则有未尽之处,让bot抓取了不必要的部分?因为这个友情链接部分的div class
也是bubbleboxbg
我在翻阅Github时翻阅到类似的插件,我把其中一部分插件拆下来写在了我目前正在使用的插件中,也许您可以从中找到有用的代码合并到当前项目中。
我添加的大致功能有:伪确图 主强加成图 武器射程图 武器详情图 品牌倾向图 当前工期开泉图
我的仓库地址:https://github.com/Sichongzou/Splatoon
原Bot仓库地址:https://github.com/Skyminers/QQBot-Splatoon2
最初版本没事 卸了老版本的插件安新的报错啥情况
NameError: name 'get_cookies' is not defined
我在使用插件的时候,在响应指令时会出现卡顿,偶尔会导致整个nonebot卡死,这可能是由于wiki网站访问不稳定的情况下导致的,我给requests添加代理会有明显改善。建议在设置里添加是否使用代理的配置项
requests是否可以修改为异步的Httpx,这样是否会有所改善。
因为Splatoon2的地图是两个小时更新一次,是否可以提供一个每两个小时定时任务,去自动推送地图。
今天我的Bot在跑这个插件的时候,在生成打工图片时出现了错误。错误为图片丢失,具体目录为 splatoon2_tools\resource\Random_Rare.png
我没有在仓库中看到这个文件,不知道是否是作者忘记添加这张图片了,还是wiki上有新的页面更新。
我在实际使用的过程中,发现打工时间错误,我一直以为是Wiki上的错误,结果仔细对比后,发现是程序错误。我发现在网页抓取的时候,默认会显示UTC时间,这和我们所常用的时间是有时间差异的。正常情况下,程序应该都没有问题,但是当出现第二天的情况,比如打工时间结束刚好是00:00的时候,理论上日期已经是第二天了,但是日期并没有变化。
环境:Ubuntu Server 20.04,Python3.8,直接使用脚手架nb-cli安装,期间无报错,VPS中运行,故应该是没有中文语言环境的
安装启动后,发送命令报错,看起来像是因为没有加载到中文字体造成的?尝试直接apt安装中文字体 fonts-wqy-microhei ttf-wqy-zenhei
没有效果。想请教一下如何能解决,谢谢。
04-18 04:08:32 [ERROR] nonebot | Running matcher <Matcher from splatoon2_tools, type=message, priority=1, temp=False> failed.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/usr/lib/python3.8/multiprocessing/spawn.py", line 129, in _main
return self._bootstrap(parent_sentinel)
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/dist-packages/uvicorn/subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "/usr/local/lib/python3.8/dist-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.8/dist-packages/nonebot/message.py", line 153, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
> File "/usr/local/lib/python3.8/dist-packages/nonebot/message.py", line 202, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/usr/local/lib/python3.8/dist-packages/nonebot/internal/matcher.py", line 668, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/usr/local/lib/python3.8/dist-packages/nonebot/internal/matcher.py", line 635, in simple_run
await handler(
File "/usr/local/lib/python3.8/dist-packages/nonebot/dependencies/__init__.py", line 92, in __call__
return await self.call(**values)
File "/usr/local/lib/python3.8/dist-packages/splatoon2_tools/__init__.py", line 25, in _handle
await salmon_run.finish(MessageSegment.image(SplatoonInfo().get_ranked_battle()))
File "/usr/local/lib/python3.8/dist-packages/splatoon2_tools/utils.py", line 27, in __init__
self.china_font = ImageFont.truetype(str(china_font_path), 16, encoding="unic")
File "/usr/local/lib/python3.8/dist-packages/PIL/ImageFont.py", line 878, in truetype
return freetype(font)
File "/usr/local/lib/python3.8/dist-packages/PIL/ImageFont.py", line 875, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/usr/local/lib/python3.8/dist-packages/PIL/ImageFont.py", line 226, in __init__
self.font = core.getfont(
OSError: cannot open resource
从早上6点左右 功能全部失效,怀疑是wiki页面变动,你的bot运行是完美的嘛
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.