python-wechaty-puppet-itchat icon indicating copy to clipboard operation
python-wechaty-puppet-itchat copied to clipboard

when i try to run bot.Contact.find,get some error.

Open fangjiyuan opened this issue 3 years ago • 3 comments

2021-09-28 16:42:08,275 - RoomBot - ERROR - should ready() the ContactSelf payload before get it, please call the <ready()> method Traceback (most recent call last): File "d:\github\python-wechaty-puppet-itchat\examples\hotreload_bot.py", line 140, in send_report contact = await bot.Contact.find(query=ContactQueryFilter(name=str3)) File "D:\ProgramData\Anaconda3\envs\py37\lib\site-packages\wechaty\user\contact.py", line 110, in find contact_list = await cls.find_all(query) File "D:\ProgramData\Anaconda3\envs\py37\lib\site-packages\wechaty\user\contact.py", line 158, in find_all contacts File "D:\ProgramData\Anaconda3\envs\py37\lib\site-packages\wechaty\user\contact.py", line 152, in lambda x: x.payload and ( File "D:\ProgramData\Anaconda3\envs\py37\lib\site-packages\wechaty\accessory.py", line 80, in payload type(self).name ValueError: should ready() the ContactSelf payload before get it, please call the <ready()> method

fangjiyuan avatar Sep 28 '21 08:09 fangjiyuan

Please update python-wechaty-puppet-itchat to the latest version to support the Contact.find function.

And note that due to the limitations of UOS-WeChat, python-wechaty-puppet-itchat cannot obtain the weixin_id of the contact, so you can only search for the contact by UOS-WeChat contact name (such as @46213ce0c1ad615c6fb330047c777e29cb19b5363047c777e29cb19b53305c)

lyleshaw avatar Sep 28 '21 09:09 lyleshaw

Please update python-wechaty-puppet-itchat to the latest version to support the Contact.find function.

And note that due to the limitations of UOS-WeChat, python-wechaty-puppet-itchat cannot obtain the weixin_id of the contact, so you can only search for the contact by UOS-WeChat contact name (such as @46213ce0c1ad615c6fb330047c777e29cb19b5363047c777e29cb19b53305c)

我已经更新了最新版本的python-wechaty-puppet-itchat,还是无法使用Contact.find,提示和一楼一样。

fangjiyuan avatar Sep 28 '21 10:09 fangjiyuan

its like not work. once i run await bot.Contact.find , its take a lot of time to load contact and error at last.

fangjiyuan avatar Oct 13 '21 09:10 fangjiyuan