Giter Site home page Giter Site logo

eggggi / yobot_remix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yuudi/yobot

75.0 75.0 29.0 16.75 MB

yobot魔改版,支持新版会战

Home Page: https://yobot.win

License: GNU General Public License v3.0

Python 41.89% HTML 27.62% JavaScript 21.82% Dockerfile 0.11% Shell 0.74% PowerShell 0.83% CSS 6.99%

yobot_remix's People

Contributors

a-kirami avatar ai-himmel avatar azurcrystal avatar cca2878 avatar corvo007 avatar cydxdianxian avatar destiny4073 avatar diving-fish avatar eggggi avatar fengjk12138 avatar girlkiller512 avatar iona-s avatar ishkong avatar lancercmd avatar librazy avatar liyk123 avatar mateoust avatar moekedama avatar myisjt avatar oreocodedev avatar otz avatar perfbleu avatar sam5440 avatar sonodahanami avatar special-week avatar tobias272727 avatar windylh avatar winrey avatar yuudi avatar zfjdhj 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

yobot_remix's Issues

周目刷新后可挑战Boss的提醒不能自动取消

realize.py 624行中,因周目数刷新提醒预约后取消预约所操作的Clan_group实例并非challenge方法中的group,所以challenge内的group保存时会覆盖掉subscribe_remind方法内取消预约的结果,导致周目刷新的提醒不能自动取消

group:Clan_group = Clan_group.get_or_none(group_id=group_id) #541行
...
if _health == 0: subscribe_remind(self, group_id, _boss_num)# 如果挪过来的血量为0,则发送预约提醒 #624行
...
group.save() #632行

复现方法:

  1. 切换到新的档案以便于测试
  2. 击败2次3号Boss,使3号Boss进入不可挑战状态
  3. 预约3号Boss
  4. 分别击败1次1、2、4、5号Boss
  5. 这时会因为3号Boss刷新,yobot发送预约提醒
  6. 查询预约表,3号Boss发送过的提醒仍在预约表内

运行时会出现OS错误

QQ图片20230311195723
大佬麻烦看看怎么解决 其他的功能都是正常的 就状态和业绩表用不了。。。。

无法使用go-cqhttp的ws连接

作为hoshinobot的插件没问题,但是作为单独yobot使用无法和go-cqhttp的ws连接,无论是如何设置access_token都报301错误(两边设置为空都是这个错误),自己尝试对比了下原版yobot源码也看不出个所以然。

公会战BOSS缺少

作者您好,本次国服3月白羊座公会战,3王是巴吉里斯克,但是类表中缺少这个BOSS的选项,烦请指点如何添加该BOSS,谢谢

作为插件运行的时候报错

[2023-04-06 19:24:16,270 nonebot] ERROR: Failed to import "hoshino.modules.yobot.yobot", error: Expecting value: line 5 column 20 (char 86)
[2023-04-06 19:24:16,270 nonebot] ERROR: Expecting value: line 5 column 20 (char 86)
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin.py", line 274, in load_plugin
module = importlib.import_module(module_path)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in find_and_load_unlocked
File "", line 671, in load_unlocked
File "", line 783, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\xcw\xcwbot\HoshinoBot\hoshino\modules\yobot\yobot_init
.py", line 1, in
from .src.client import nonebot_plugin
File "C:\xcw\xcwbot\HoshinoBot\hoshino\modules\yobot\yobot\src\client\nonebot_plugin.py", line 44, in
bot = Yobot(
File "C:\xcw\xcwbot\HoshinoBot\hoshino\modules\yobot\yobot\src\client\yobot.py", line 106, in init
cfg = json.load(config_file)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json_init
.py", line 293, in load
return loads(fp.read(),
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json_init.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 5 column 20 (char 86)

网页端页面不显示

dalao您好,打扰下,我是以插件版用的,将您的项目git clone到modules下,然后将原来yobot的yobot_data目录拷到您的项目里,最后启动服务,目前qq群里返回都是正常的,但页面版不显示
image
我通过F12,发现错误的页面返回是404,这是什么情况?麻烦dalao指导下,非常感谢
image

跨阶段跨两周目,boss状态可能判断有误

公会刚碰到的,不确定是哪里导致的问题。
具体的实际情况是:43-44圈的1-4王已经打完,剩下43-44圈的牛。然后击败43圈和44圈的牛之后,1~4王变为46周目了。

自己测试了一下,过程如下:
· 当前周目43:
1-4王 下一周目0血(显示为44周目0血)
5王 当前周目满血(显示为43周目满血)
· 击败5王后,当前周目44:
1-4王 下一周目0血(显示为45周目0血)
5王 当前周目满血(显示为44周目满血)
· 击败5王后,当前周目45:
1-4王 下一周目满血 (显示为46周目满血)
5王 当前周目满血(显示为45周目满血)
直接复现的操作如下:
当前周目为44,手动修改1-4王为下一周目0血,5王为当前周目满血,击败5王后1-4王变成46周目满血

求指点
)RXD(O4%DW0PG@R0(8~UM%P

临时会话私聊无法登陆问题

私聊登陆的时候,只有添加好友的才能正常获取登陆网址,从群里发起的临时会话无法正常获取登陆网址,是go-cqhttp设置不对还是yobot的配置有问题呢
image
image

状态查询不能正常显示

蛮怪的,前一天特地更新了一下,觉得太久没更新了,现在是查刀功能正常,有反馈。但是状态没有反应。
我以为是风控了图片发不出来,我登录了go-cqhttp的后台查看,也没有BOT发言的样子,如果被风控了应该会看见图片发送失败的日志
烦请dalao帮忙看看是啥情况,是指令变了吗
image
image

关于挂树留言功能

在原版yobot中,挂树之后查树是会显示留言的,这一功能大多应该是用于合刀。
而大佬的魔改版好像只能通过状态指令来查树,而且不会显示留言。
在翻看了代码和数据库之后发现挂树并留言后留言信息是会正常读取并保存的,本蒟蒻尝试希望能让状态正常输出留言但却一直都无法正常运行。
src\client\ybplugins\clan_battle\components\realize.py大概是在这里修改吧?

                        #1175行
			if info['tree']:
				temp_msg += ', 已挂树'
			if info['msg']:
				temp_msg += info['msg']
			msg.append(temp_msg)
		msg.append('--------------------')

添加了如上的msg,但完全无法运行,希望大佬能解惑!

有一个小小的问题,希望大佬帮忙看看

大佬好,我是新改的魔改版,之前一直用的原版。这个版本非常合理,很好用,但是有一个小瑕疵。就是4王获取失败了,明明这期打的乌龟,却获取成了鹿。这是哪里设置有问题呢?
1

关于预约的问题

现在预约了以后到那个boss,不管打没打都会自动取消预约,比如我预约了1王,等下一个1王出现以后,我的预约就被取消掉了。即使这一周目的1王我没打。
可以把这个机制改成,我预约了以后,直到我出了1王的刀之前,无论过多少轮都不会被取消掉吗

插件启动报错,找不到yobot_data这个文件夹

这个应该是启动时自动生成的吧?
以下是报错

[2023-04-08 23:29:05,377 nonebot] ERROR: Failed to import and load "hoshino.modules.yobot.yobot", error: [Errno 2] No such file or directory: '/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/src/client/ybplugins/clan_battle/components/../../../yobot_data/user_profile'
[2023-04-08 23:29:05,378 nonebot] ERROR: [Errno 2] No such file or directory: '/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/src/client/ybplugins/clan_battle/components/../../../yobot_data/user_profile'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin.py", line 419, in _load_plugin
module = importlib.import_module(module_path)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/init.py", line 1, in
from .src.client import nonebot_plugin
File "/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/src/client/nonebot_plugin.py", line 30, in
from .yobot import Yobot
File "/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/src/client/yobot.py", line 22, in
from .ybplugins import (clan_battle, homepage,
File "/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/src/client/ybplugins/clan_battle/init.py", line 1, in
from .battle import ClanBattle
File "/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/src/client/ybplugins/clan_battle/battle.py", line 6, in
from .components.kernel import init, execute, jobs, match
File "/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/src/client/ybplugins/clan_battle/components/kernel.py", line 15, in
from .image_engine import download_missing_user_profile
File "/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/src/client/ybplugins/clan_battle/components/image_engine.py", line 18, in
USER_HEADERS_PATH.mkdir()
File "/usr/lib/python3.8/pathlib.py", line 1288, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/root/pcrbot/HoshinoBot/hoshino/modules/yobot/yobot/src/client/ybplugins/clan_battle/components/../../../yobot_data/user_profile'

boss切换阶段数后血量不会自动补满

例如四阶段向五阶段切换时,当成员全部挑战完毕后,boss变为五阶段了,最大血量随之改变,但当前血量没有被补满,数值为四阶段的最大血量。同时尝试了三阶段切四阶段,同样遇到了这样的问题,其他时候没有问题,只有在阶段切换时才会出现,麻烦作者大大看看如何解决,感谢!
image

建议默认开启yobot_remix服务

更新后发现yobot用不了了,找了半天原因,查看了更新记录,才发现接入了服务管理并且默认关闭,建议默认开启hhh

sv = Service("yobot_remix", enable_on_default=True, visible=True)

[Bug]同一机器人实例下同一QQ在不同公会间的nickname相互覆盖

比如:
QQ号114514同时在群A和群B中,在群A中该QQ的群名片为“田所”,在群B中该QQ的群名片为“浩二”。然后在同一个yobot实例下,该QQ先后加入了群A对应的公会A和群B对应的公会B。那么无论在群A公会中还是在群B公会中该QQ的nickname均会显示为最后加入的公会对应的群中的群名片,此例中即为群B中该QQ的群名片“浩二”。

修起来应该不复杂,但是要动数据结构,不敢保证和以前数据的兼容性。

boss尾刀报错

1-5王是 47 47 47 46 47
尾刀4王就会报错其他不会
目前更新到最新也不行
以下是报错内容
Task exception was never retrieved
future: <Task finished name='Task-119' coro=<CQHttp.handle_event_with_response() done, defined at C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp_init.py:606> exception=No option '1098043137' in section: 'GROUPS'>
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\configparser.py", line 789, in get
value = d[option]
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\collections_init_.py", line 891, in getitem
return self.missing(key) # support subclasses that define missing
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\collections_init_.py", line 883, in missing
raise KeyError(key)
KeyError: '1098043137'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp_init_.py", line 608, in _handle_event_with_response
response = await self.handle_event(payload)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp_init
.py", line 601, in handle_event
filter(lambda r: r is not None, await
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp\bus.py", line 60, in emit
results += await run_async_funcs(self.subscribers[event], *args,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp\utils.py", line 40, in run_async_funcs
results += await asyncio.gather(*coros)
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\main.py", line 109, in handle_msg
reply = await bot.proc_async(context)
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\yobot.py", line 339, in proc_async
res = pitem.execute(func_num, msg)
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\ybplugins\clan_battle\components\kernel.py", line 199, in execute
boss_status = self.challenge(group_id, user_id, True, None, behalf, is_continue,
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\ybplugins\clan_battle\components\realize.py", line 695, in challenge
subscribe_remind(self, group_id, boss_num)
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\ybplugins\clan_battle\components\realize.py", line 815, in subscribe_remind
self_id = who_am_i(group_id),
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\ybplugins\clan_battle\components\multi_cq_utils.py", line 16, in who_am_i
sid = config.get('GROUPS', str(GID))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\configparser.py", line 792, in get
raise NoOptionError(option, section)
configparser.NoOptionError: No option '1098043137' in section: 'GROUPS'
Task exception was never retrieved
future: <Task finished name='Task-135' coro=<CQHttp.handle_event_with_response() done, defined at C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp_init.py:606> exception=No option '1098043137' in section: 'GROUPS'>
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\configparser.py", line 789, in get
value = d[option]
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\collections_init
.py", line 891, in getitem
return self.missing(key) # support subclasses that define missing
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\collections_init
.py", line 883, in missing
raise KeyError(key)
KeyError: '1098043137'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp_init_.py", line 608, in _handle_event_with_response
response = await self.handle_event(payload)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp_init
.py", line 601, in _handle_event
filter(lambda r: r is not None, await
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp\bus.py", line 60, in emit
results += await run_async_funcs(self._subscribers[event], *args,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiocqhttp\utils.py", line 40, in run_async_funcs
results += await asyncio.gather(*coros)
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\main.py", line 109, in handle_msg
reply = await bot.proc_async(context)
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\yobot.py", line 339, in proc_async
res = pitem.execute(func_num, msg)
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\ybplugins\clan_battle\components\kernel.py", line 199, in execute
boss_status = self.challenge(group_id, user_id, True, None, behalf, is_continue,
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\ybplugins\clan_battle\components\realize.py", line 695, in challenge
subscribe_remind(self, group_id, boss_num)
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\ybplugins\clan_battle\components\realize.py", line 815, in subscribe_remind
self_id = who_am_i(group_id),
File "C:\Users\Administrator\Desktop\yobot\yobot_remix-stable\src\client\ybplugins\clan_battle\components\multi_cq_utils.py", line 16, in who_am_i
sid = config.get('GROUPS', str(GID))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\configparser.py", line 792, in get
raise NoOptionError(option, section)
configparser.NoOptionError: No option '1098043137' in section: 'GROUPS'

关于代挂树留言和挂树私聊通知

大佬,人号分离会因为有私聊需求所以把原本注释的代码改了回来,然后发现自己报挂树也会私聊自己╭(°A°`)╮
然后是代发挂树可以,但不能留言,留言会识别不到后面的艾特,感觉有点麻烦。

关于boss阶段血量的疑问

需求:1阶段=1周目boss,即每周目的boss血量都不同设置

yobot原版的config文件是这样保存的:

        "jp": [
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            11,
            [
                10,
                11
            ]
        ],

而魔改版是这样的
在网页端如果在一阶段写起始到结束为1-1,二阶段写周目起始到结束为2-2会报错,不允许这样保存,如果直接修改文件后大概是可以正常运行的。
想提问一下原版如果1周目等于1阶段设置有什么问题吗,会导致bug吗?
魔改版也这样1周目等于1阶段的设置了,运行了数天貌似是没有问题,但还是很担心。

        "jp": [
            [
                1,
                1
            ],
            [
                2,
                2
            ],
            [
                3,
                3
            ],
            [
                4,
                4
            ],
            [
                5,
                5
            ],
            [
                6,
                6
            ],
            [
                7,
                7
            ],
            [
                8,
                8
            ],
            [
                9,
                9
            ],
            [
                10,
                11
            ]
        ],

关于依赖项OpenCC 1.1.1的问题

这个目前只有x86/amd64的架构才能支持,如果跑在arm的设备上直接gg,高版本的也只有苹果的macos arm64支持,建议调整依赖以提高兼容性,毕竟这种级别的运算并不一定需要x86的设备。

更新后私聊登录功能失效,私聊bot无反应

3天前的旧版本私聊登录功能正常,但是更新到最新版后私聊登录功能失效,检查了cqgo的允许发送临时会话也已经开启,对比了历史commits没看懂哪里出了问题,作者大大帮忙看下感谢!

关于状态展示面板改进

计划改进一下状态的展示面板,以提高可读性。目前在我的分支上搓的内容

准备把预约表和申请出刀留言都做成QQ头像+群昵称+备注的chips形状,但是这样的话可能要加QQ头像缓存,我看现在的代码里面应该是没有做这一块,考虑定时刷新和异步请求缓存要动的刀可能有点多

你觉得这个改动咋样,有没有必要加QQ头像这一块(

下面是现在的样子,五个放一起的话背景色会用一点变化区分开(准备)
tmp57386_d8

大佬,这个作为插件怎么用呀_(:з」∠)_

不打包的话加到插件里没反应,打包的话最后PyInstaller报错Unable to find "D:\python\lib\site-packages\opencc\config" when adding binary and data files.然后我查看opencc文件夹,并没有config这个文件。opencc版本为1.1.1,python版本为3.8

无法取消预约

预约之后好像无法取消预约,还有个问题好像是一刀收了3个BOSS有一刀会算了到第二刀

建议添加IPv6的支持

这也是之前的yobot的遗留问题了,如果用IPv6登录的话会报错

stderr: [2023-04-24 08:56:09,989] ERROR in app: Exception on request GET /login/
stderr: Traceback (most recent call last):
stderr:   File "/usr/local/lib/python3.8/site-packages/quart/app.py", line 1650, in handle_request
stderr:     return await self.full_dispatch_request(request_context)
stderr:   File "/usr/local/lib/python3.8/site-packages/quart/app.py", line 1675, in full_dispatch_request
stderr:     result = await self.handle_user_exception(error)
stderr:   File "/usr/local/lib/python3.8/site-packages/quart/app.py", line 1107, in handle_user_exception
stderr:     raise error
stderr:   File "/usr/local/lib/python3.8/site-packages/quart/app.py", line 1673, in full_dispatch_request
stderr:     result = await self.dispatch_request(request_context)
stderr:   File "/usr/local/lib/python3.8/site-packages/quart/app.py", line 1718, in dispatch_request
stderr:     return await self.ensure_async(handler)(**request_.view_args)
stderr:   File "/yobot/ybplugins/login.py", line 353, in yobot_login
stderr:     user = self._recall_from_cookie(auth_cookie)
stderr:   File "/yobot/ybplugins/login.py", line 267, in _recall_from_cookie
stderr:     userlogin.save()
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 6532, in save
stderr:     rows = self.update(**field_dict).where(self._pk_expr()).execute()
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1898, in inner
stderr:     return method(self, database, *args, **kwargs)
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1969, in execute
stderr:     return self._execute(database)
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2465, in _execute
stderr:     cursor = database.execute(self)
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3141, in execute
stderr:     sql, params = ctx.sql(query).query()
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 608, in sql
stderr:     return obj.__sql__(self)
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2518, in __sql__
stderr:     (ctx
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 608, in sql
stderr:     return obj.__sql__(self)
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1764, in __sql__
stderr:     ctx.sql(self.nodes[n_nodes - 1])
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 608, in sql
stderr:     return obj.__sql__(self)
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1764, in __sql__
stderr:     ctx.sql(self.nodes[n_nodes - 1])
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 608, in sql
stderr:     return obj.__sql__(self)
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1374, in __sql__
stderr:     return ctx.value(self.value, self.converter)
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 620, in value
stderr:     value = converter(value)
stderr:   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 5110, in db_value
stderr:     return struct.unpack('!I', socket.inet_aton(val))[0]
stderr: OSError: illegal IP address string passed to inet_aton

这年头手机的蜂窝网络自带IPv6,如果挂到带IPv6的服务器上会有这种问题发生

关于Dockerfile的改进

经过了一周的折腾,终于在arm64架构的软路由上用docker跑起来了,Dockerfile在我这边是需要修改之后才能构建部署成功的

FROM python:3.8-slim-buster
LABEL maintainer="yobot"

ENV PYTHONIOENCODING=utf-8

ADD src/client/ /yobot

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo 'Asia/Shanghai' >/etc/timezone \
    && apt update \
    && apt upgrade -y \
    && apt install build-essential -y \
    && cd /yobot \
    && pip3 install aiocqhttp==0.6.8 Quart==0.6.15 markupsafe==2.0.1 --no-cache-dir \
    && pip3 install -r requirements.txt --no-cache-dir \
    && python3 main.py \
    && chmod +x yobotg.sh

WORKDIR /yobot

EXPOSE 9222

VOLUME /yobot/yobot_data

ENTRYPOINT /yobot/yobotg.sh

鄙人不才,望大佬不要介意

无法运行yobotg.sh文件

在运行sh yobotg.sh后出现如下报错:

root@Lampe:/home/Lampe/pcrbot/yobot_remix/src/client/dist# sh yobotg.sh
Traceback (most recent call last):
  File "main.py", line 36, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "aiocqhttp/__init__.py", line 19, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "quart/__init__.py", line 7, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "quart/app.py", line 46, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "quart/asgi.py", line 29, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "quart/debug.py", line 6, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "jinja2/__init__.py", line 12, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "jinja2/environment.py", line 25, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "jinja2/defaults.py", line 3, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 352, in exec_module
  File "jinja2/filters.py", line 13, in <module>
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/tmp/_MEIa1fTY0/markupsafe/__init__.pyc)
[2088] Failed to execute script 'main' due to unhandled exception!

搜索得知可能需要降级MarkupSafe,"Downgrade markupsafe to 2.0.1"
将MarkupSafe降级,pip3 install markupsafe==2.0.1,提示

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
werkzeug 2.2.1 requires MarkupSafe>=2.1.1, but you have markupsafe 2.0.1 which is incompatible.

将一些依赖依次降级后,运行sh yobotg.sh还是同样的报错,我的系统版本是Ubuntu 20.04.5 LTS,python版本是3.8.10,下面是我的依赖版本

Package                     Version
--------------------------- -----------
aiocqhttp                   0.6.8
aiofiles                    23.1.0
aiohttp                     3.8.4
aiosignal                   1.3.1
altgraph                    0.17.3
anyio                       3.6.2
APScheduler                 3.10.0
arrow                       0.17.0
async-timeout               4.0.2
attrs                       22.2.0
backports.zoneinfo          0.2.1
beautifulsoup4              4.11.2
blinker                     1.5
certifi                     2022.12.7
charset-normalizer          3.0.1
click                       8.1.3
expiringdict                1.2.2
feedparser                  5.2.1
frozenlist                  1.3.3
h11                         0.14.0
h2                          4.1.0
hpack                       4.0.0
httpcore                    0.16.3
httpx                       0.23.3
Hypercorn                   0.5.4
hyperframe                  6.0.1
idna                        3.4
importlib-metadata          6.0.0
itsdangerous                2.1.2
Jinja2                      2.11.3
MarkupSafe                  2.0.1
multidict                   6.0.4
opencc-python-reimplemented 0.1.7
peewee                      3.15.4
Pillow                      7.2.0
pip                         23.0
priority                    2.0.0
pyinstaller                 5.8.0
pyinstaller-hooks-contrib   2023.0
python-dateutil             2.8.2
pytoml                      0.1.21
pytz                        2022.7.1
pytz-deprecation-shim       0.1.0.post0
Quart                       0.6.15
requests                    2.28.2
rfc3986                     1.5.0
setuptools                  67.1.0
six                         1.16.0
sniffio                     1.3.0
sortedcontainers            2.4.0
soupsieve                   2.4
toml                        0.10.2
typing_extensions           4.5.0
tzdata                      2022.7
tzlocal                     4.2
urllib3                     1.26.14
Werkzeug                    2.1.2
wheel                       0.38.4
wsproto                     1.2.0
yarl                        1.8.2
zipp                        3.13.0

麻烦大佬有空帮我看下是什么原因,谢谢

碰到个奇怪的bug,尾刀后数据异常,不回复

image
这里尾刀4王后,状态应该是1234王是6周目0血,无法继续挑战,5王是5周目满血状态
image
这里申请出刀5,到这里还正常
image
但是之后尾刀没有回复,且依旧是申请状态,无法继续申请
image
此时看状态,申请没有解除,所有boss血量没变但是加了一个周目

很莫名的一个bug

正常报刀到第三周目开始后,不知道为什么尾掉第三周目的1王后,bot直接报的是杀了4周目的1王,但是一周目全报完之后,数据又对了。。。。
XSHF47ET7P{%IT3U~T3_6O8

冒号留言相关功能无效

原版yobot可以使用类似“预约1:5点来”这样实现预约表中的留言。印象里中英文冒号都可以实现。
可当前版本使用冒号无效,不管是在预约场合还是在挂树场合。
如图:
QQ截图20220705001521
QQ截图20220705000836
QQ截图20220705000915
QQ截图20220705000935

另外还有个问题是。由于当前国服尚未更新自由出刀模式,是不是意味着我无法在remix版中实现,尾刀1王,提示2王预约者这个功能?

感谢老师

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.