chingkingm / honkai_mys

player info card of honkai impact 3rd
GNU General Public License v3.0
34 stars 6 forks source link

bhv#报错 #25

Closed doiss closed 2 years ago

doiss commented 2 years ago

![Uploading IMG_20220319_122637.jpg…]()

chingkingm commented 2 years ago

图看不了

OriginElysia commented 2 years ago

我也遇见了这个问题 报错内容如下: ERROR: <class 'AttributeError'> occured when bh3_chara_card handling message 833844119. [2022-03-19 17:33:00,421 崩坏3角色卡片] ERROR: type object 'MessageSegment' has no attribute 'reply' Traceback (most recent call last): File "hoshino/msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "hoshino/modules/honkai_mys/init.py", line 103, in bh3_chara_card await bot.send(ev, MessageSegment.reply(ev.message_id) + "制图中,请稍后") AttributeError: type object 'MessageSegment' has no attribute 'reply'

chingkingm commented 2 years ago

我也遇见了这个问题 报错内容如下: ERROR: <class 'AttributeError'> occured when bh3_chara_card handling message 833844119. [2022-03-19 17:33:00,421 崩坏3角色卡片] ERROR: type object 'MessageSegment' has no attribute 'reply' Traceback (most recent call last): File "hoshino/msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "hoshino/modules/honkai_mys/init.py", line 103, in bh3_chara_card await bot.send(ev, MessageSegment.reply(ev.message_id) + "制图中,请稍后") AttributeError: type object 'MessageSegment' has no attribute 'reply'

这个是aiocqhttp版本低了,升级一下就行了

OriginElysia commented 2 years ago

我也遇见了这个问题 报错内容如下: ERROR: <class 'AttributeError'> occured when bh3_chara_card handling message 833844119. [2022-03-19 17:33:00,421 崩坏3角色卡片] ERROR: type object 'MessageSegment' has no attribute 'reply' Traceback (most recent call last): File "hoshino/msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "hoshino/modules/honkai_mys/init.py", line 103, in bh3_chara_card await bot.send(ev, MessageSegment.reply(ev.message_id) + "制图中,请稍后") AttributeError: type object 'MessageSegment' has no attribute 'reply'

这个是aiocqhttp版本低了,升级一下就行了

问题解决,无报错了,感谢

doiss commented 2 years ago

我也遇见了这个问题 报错内容如下: ERROR: <class 'AttributeError'> occured when bh3_chara_card handling message 833844119. [2022-03-19 17:33:00,421 崩坏3角色卡片] ERROR: type object 'MessageSegment' has no attribute 'reply' Traceback (most recent call last): File "hoshino/msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "hoshino/modules/honkai_mys/init.py", line 103, in bh3_chara_card await bot.send(ev, MessageSegment.reply(ev.message_id) + "制图中,请稍后") AttributeError: type object 'MessageSegment' has no attribute 'reply'

这个是aiocqhttp版本低了,升级一下就行了 问题解决了,不过更新bh语音资源这个指令好像代码不对还是我的版本低了? 这样不行 @sv.on_rex(r"^更新(崩坏?|bh|bbb|崩崩崩)(3|三)?语音列表$") async def update_voice_list(bot: HoshinoBot, ev: CQEvent): if not priv.check_priv(ev, priv.SU): return data = gen_voice_list() data_dict = split_voice_by_chara(data) with open( os.path.join(os.path.dirname(file), "record.json"), "w", encoding="utf8" ) as f: json.dump(data_dict, f, indent=4, ensure_ascii=False) num_normal = sum(len(data_dict["normal"][v]) for v in data_dict["normal"]) num_hard = sum(len(data_dict["hard"][v]) for v in data_dict["hard"]) await bot.send( ev, f"崩坏3语音列表更新完成,当前共有语音{num_hard+num_normal}条,其中普通{num_normal}条,困难{num_hard}条" ) 这样可以 @sv.on_rex(r"^更新(崩坏?|bh|bbb|崩崩崩)(3|三)?语音列表$") async def update_voice_list(bot: HoshinoBot, ev: CQEvent): if not priv.check_priv(ev, priv.SUPERUSER): return data = gen_voice_list() data_dict = split_voice_by_chara(data) with open( os.path.join(os.path.dirname(file), "record.json"), "w", encoding="utf8" ) as f: json.dump(data_dict, f, indent=4, ensure_ascii=False) num_normal = sum(len(data_dict["normal"][v]) for v in data_dict["normal"]) num_hard = sum(len(data_dict["hard"][v]) for v in data_dict["hard"]) await bot.send( ev, f"崩坏3语音列表更新完成,当前共有语音{num_hard+num_normal}条,其中普通{num_normal}条,困难{num_hard}条" )

chingkingm commented 2 years ago

我也遇见了这个问题 报错内容如下: ERROR: <class 'AttributeError'> occured when bh3_chara_card handling message 833844119. [2022-03-19 17:33:00,421 崩坏3角色卡片] ERROR: type object 'MessageSegment' has no attribute 'reply' Traceback (most recent call last): File "hoshino/msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "hoshino/modules/honkai_mys/init.py", line 103, in bh3_chara_card await bot.send(ev, MessageSegment.reply(ev.message_id) + "制图中,请稍后") AttributeError: type object 'MessageSegment' has no attribute 'reply'

这个是aiocqhttp版本低了,升级一下就行了 问题解决了,不过更新bh语音资源这个指令好像代码不对还是我的版本低了? 这样不行 @sv.on_rex(r"^更新(崩坏?|bh|bbb|崩崩崩)(3|三)?语音列表$") async def update_voice_list(bot: HoshinoBot, ev: CQEvent): if not priv.check_priv(ev, priv.SU): return data = gen_voice_list() data_dict = split_voice_by_chara(data) with open( os.path.join(os.path.dirname(file), "record.json"), "w", encoding="utf8" ) as f: json.dump(data_dict, f, indent=4, ensure_ascii=False) num_normal = sum(len(data_dict["normal"][v]) for v in data_dict["normal"]) num_hard = sum(len(data_dict["hard"][v]) for v in data_dict["hard"]) await bot.send( ev, f"崩坏3语音列表更新完成,当前共有语音{num_hard+num_normal}条,其中普通{num_normal}条,困难{num_hard}条" ) 这样可以 @sv.on_rex(r"^更新(崩坏?|bh|bbb|崩崩崩)(3|三)?语音列表$") async def update_voice_list(bot: HoshinoBot, ev: CQEvent): if not priv.check_priv(ev, priv.SUPERUSER): return data = gen_voice_list() data_dict = split_voice_by_chara(data) with open( os.path.join(os.path.dirname(file), "record.json"), "w", encoding="utf8" ) as f: json.dump(data_dict, f, indent=4, ensure_ascii=False) num_normal = sum(len(data_dict["normal"][v]) for v in data_dict["normal"]) num_hard = sum(len(data_dict["hard"][v]) for v in data_dict["hard"]) await bot.send( ev, f"崩坏3语音列表更新完成,当前共有语音{num_hard+num_normal}条,其中普通{num_normal}条,困难{num_hard}条" )

这个是Hoshino版本的问题,写成SUPERUSER也一样

Oyuanchu commented 2 years ago

我也出现这个问题,请问aiocqhttp升级到哪个版本

chingkingm commented 2 years ago

我也出现这个问题,请问aiocqhttp升级到哪个版本

不低于1.4.0Screenshot_20220418-005211__01.jpg