python-wechaty
python-wechaty copied to clipboard
🐛🐛 Bug Report: AssertionError assert response is not None
Describe your problem
群发消息错误
Reproduce your problem
k = 0
for room in rooms:
if room is not None:
k = k + 1
if k >= 7:
await asyncio.sleep(random.randint(60, 120))
k = 0
await asyncio.sleep(random.randint(5, 20))
await room.say(msg)
Error info
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/apscheduler/executors/base_py3.py", line 30, in run_coroutine_job
retval = await job.func(*job.args, **job.kwargs)
File "wechaty_client_pad.py", line 305, in execute
await room.say(msg)
File "/usr/local/lib/python3.7/site-packages/wechaty/user/room.py", line 289, in say
mention_ids=mention_ids
File "/usr/local/lib/python3.7/site-packages/wechaty_puppet_service/puppet.py", line 337, in message_send_text
text=message, mentonal_ids=mention_ids)
File "/usr/local/lib/python3.7/site-packages/wechaty_grpc/wechaty/__init__.py", line 438, in message_send_text
"/wechaty.Puppet/MessageSendText", request, puppet.MessageSendTextResponse
File "/usr/local/lib/python3.7/site-packages/betterproto/__init__.py", line 1125, in _unary_unary
assert response is not None
AssertionError
msg是文本么? say只支持文本和filebox。。。
from the above error log info, we can't find out the key error to help you fix this issue. Please post more detail info:
- the version of wechaty related packages, you can use command:
pip list | grep wechaty - the type of msg which can be: str,
UrlLink,FileBox,MiniProgram
version of wechaty:
wechaty 0.8.25
wechaty-grpc 0.20.19
wechaty-plugin-contrib 0.0.12
wechaty-puppet 0.3.dev10
wechaty-puppet-service 0.8.5
the type of msg is str