TWT233/khl.py

Error when receiving picture

Closed this issue · 2 comments

An exception occurred when the robot received a picture.

Error message:

Task exception was never retrieved
future: <Task finished name='Task-33' coro=<Bot._event_handler.<locals>._dispatch_msg() done, defined at D:\Python\Python39\lib\site-packages\khl\bot.py:104> exception=AttributeError("'NoneType' object has no attribute 'type'")>
Traceback (most recent call last):
  File "D:\Python\Python39\lib\site-packages\khl\bot.py", line 107, in _dispatch_msg
    if m.type == Msg.Types.SYS:
AttributeError: 'NoneType' object has no attribute 'type'

How to reproduce:

Just send a picture

Operating environment:

OS: Windows 10.0.19043.1151
Python v3.9.5:0a7dcbd
khl.py 0.0.9

thx for rep, fix scheduled to be patched in 2days

and if u wanna fix it please PR, i am glad to review ❤️

already done in eb306de, the commit is merged into master and released with v0.0.10, try update your khl.py