pydantic_core._pydantic_core.ValidationError: 1 validation error for GroupAdminNoticeEvent
user_id
Field required [type=missing, input_value={'adapter': <alicebot.ada...h8Pkmgjza5wKOEiO4zOu1g'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.6/v/missing
pydantic_core._pydantic_core.ValidationError: 2 validation errors for GroupAdminNoticeEvent
sub_type
Input should be 'set' or 'unset' [type=literal_error, input_value='un_set', input_type=str]
For further information visit https://errors.pydantic.dev/2.6/v/literal_error
user_id
Field required [type=missing, input_value={'adapter': <alicebot.ada...h8Pkmgjza5wKOEiO4zOu1g'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.6/v/missing
直接用websockets库接收事件并打印,是没有user_id,sub_type也是un_set
复现 Bug
import asyncio
import websockets
async def listen():
uri = "ws://"
async with websockets.connect(uri) as websocket:
while True:
event = await websocket.recv()
print(event)
描述 Bug
管理员增加:缺少user_id字段 管理员减少:缺少user_id字段;sub_type字段期望是set/unset,得到un_set
pydantic_core._pydantic_core.ValidationError: 1 validation error for GroupAdminNoticeEvent user_id Field required [type=missing, input_value={'adapter': <alicebot.ada...h8Pkmgjza5wKOEiO4zOu1g'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.6/v/missing
pydantic_core._pydantic_core.ValidationError: 2 validation errors for GroupAdminNoticeEvent sub_type Input should be 'set' or 'unset' [type=literal_error, input_value='un_set', input_type=str] For further information visit https://errors.pydantic.dev/2.6/v/literal_error user_id Field required [type=missing, input_value={'adapter': <alicebot.ada...h8Pkmgjza5wKOEiO4zOu1g'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.6/v/missing
直接用websockets库接收事件并打印,是没有user_id,sub_type也是un_set
复现 Bug
import asyncio import websockets
async def listen(): uri = "ws://" async with websockets.connect(uri) as websocket: while True: event = await websocket.recv() print(event)
asyncio.run(listen())
系统信息