You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2020-08-29 20:38:38,831 chat] ERROR: <class 'aiocqhttp.exceptions.NetworkError'> occured when who_is_longwang handling message 10617.
[2020-08-29 20:38:38,831 chat] ERROR: WebSocket API call timeout
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 118, in fetch
return await asyncio.wait_for(future, timeout_sec)
File "/usr/lib/python3.8/asyncio/tasks.py", line 490, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message
await sf.func(bot, event)
File "/root/HoshinoBot/hoshino/service.py", line 218, in wrapper
return await func(bot, event)
File "/root/HoshinoBot/hoshino/modules/groupmaster/chat.py", line 25, in who_is_longwang
data = await bot.get_group_honor_info(group_id=gid, type='talkative')
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/__init__.py", line 223, in call_action
return await self._api.call_action(action=action, **params)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 186, in call_action
result = await self._wsr_api.call_action(action, **params)
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 162, in call_action
await ResultStore.fetch(seq, self._timeout_sec))
File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 122, in fetch
raise NetworkError('WebSocket API call timeout')
aiocqhttp.exceptions.NetworkError: WebSocket API call timeout
调用get_group_honor_info方法试图获取当前龙王,等待很久然后报错API超时
复现
`
@sv.on_fullmatch('谁是龙王')
async def who_is_longwang(bot, ev):
gid = ev.group_id
data = await bot.get_group_honor_info(group_id=gid, type='talkative')
talkative = data.current_talkative
sv.logger.info(f'[longwang INFO]:{talkative}')
at = MessageSegment.at(talkative.user_id)
msg = f'{at}是龙王,持续天数{talkative.day_count}天'
await bot.send(ev, msg)`
1.使用以上代码试图获取群荣誉信息
2.等待1分钟后控制台报错WebSocket API call timeout
版本
cqhttp-mirai-
0.2.3-embedded-all.jar
mirai-core-
mirai-console-
The text was updated successfully, but these errors were encountered: