wechaty / python-wechaty

Python Wechaty is a Conversational RPA SDK for Chatbot Makers written in Python
https://wechaty.readthedocs.io/zh_CN/latest/
Apache License 2.0
1.62k stars 234 forks source link

⁉ ⁉Room topic changed event causes the bot scripts crashes. #360

Closed lixin396 closed 2 years ago

lixin396 commented 2 years ago

requirements

Describe your problem

When the room topic is changed, the bot scripts crashes.

Reproduce your problem

# Just a normal bot scripts.

Error info

the field is required in dataclass<<class 'wechaty_puppet.schemas.event.EventRoomTopicPayload'>> Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001CC2C6BF2E0> Traceback (most recent call last): File "C:\Python310\lib\asyncio\proactor_events.py", line 116, in del File "C:\Python310\lib\asyncio\proactor_events.py", line 108, in close File "C:\Python310\lib\asyncio\base_events.py", line 750, in call_soon File "C:\Python310\lib\asyncio\base_events.py", line 515, in _check_closed RuntimeError: Event loop is closed

Your experiments

Downgrade wechaty-puppet-xp@1.11.14 to wechaty-puppet-xp@1.10.27 in the gateway part, the bot scripts runs normally, but some functions can't be used normally, for example, sending wechat mini program card. Maybe the notification messages of room name changed event between two puppet-xp versions are different.

lixin396 commented 2 years ago

Downgrade wechat-puppet-xp to version 1.11.1, it semms work well. Function for sending mini program works well, the bot runs well.

lixin396 commented 2 years ago

Wechaty-puppet-xp@1.11.14 not transfer 'timestamp' parameter in EventRoomTopicPayload. May it could be solved by Wechaty-puppet-xp.