Open noorwellwood opened 1 year ago
A bad news you should know: web-protocol can not be used in most of WeChat account. this error is from the source of message connecting with wechat server.
But, If you want to use free protocol, you can refer to :https://github.com/wechaty/puppet-xp
使用的wechaty-puppet-wechat,也有如上报错,有大佬知道怎么处理?
same as me
2022-07-10 11:05:33,342 - Wechaty - INFO - init_puppet_event_bridge() <<wechaty_puppet_service.puppet.PuppetService object at 0x7ff47c73b160>> 2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(dong) (listenerCount:1) registering... 2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(error) (listenerCount:1) registering... 2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(heart-beat) (listenerCount:1) registering... 2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(ready) (listenerCount:1) registering... 2022-07-10 11:05:33,342 - Wechaty - INFO - receive event <%s>
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(reset) (listenerCount:0) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(friendship) (listenerCount:1) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(login) (listenerCount:1) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(logout) (listenerCount:1) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(message) (listenerCount:1) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-invite) (listenerCount:1) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-join) (listenerCount:1) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-leave) (listenerCount:1) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(room-topic) (listenerCount:1) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - initPuppetEventBridge() puppet.on(scan) (listenerCount:1) registering...
2022-07-10 11:05:33,342 - Wechaty - INFO - starting puppet ...
2022-07-10 11:05:33,342 - PuppetService - INFO - init puppet ...
2022-07-10 11:05:33,343 - PuppetService - INFO - starting the puppet ...
Traceback (most recent call last):
File "/home/coin/.local/share/virtualenvs/sale_project-XXcpAaoz/lib/python3.10/site-packages/wechaty_puppet_service/puppet.py", line 916, in start
await self.puppet_stub.stop()
File "/home/coin/.local/share/virtualenvs/sale_project-XXcpAaoz/lib/python3.10/site-packages/wechaty_grpc/wechaty/init.py", line 25, in stop
return await self._unary_unary(
File "/home/coin/.local/share/virtualenvs/sale_project-XXcpAaoz/lib/python3.10/site-packages/betterproto/init.py", line 1123, in _unary_unary
await stream.send_message(request, end=True)
File "/home/coin/.local/share/virtualenvs/sale_project-XXcpAaoz/lib/python3.10/site-packages/grpclib/client.py", line 241, in send_message
await self.send_request()
File "/home/coin/.local/share/virtualenvs/sale_project-XXcpAaoz/lib/python3.10/site-packages/grpclib/client.py", line 205, in send_request
release_stream = await stream.send_request(
File "/home/coin/.local/share/virtualenvs/sale_project-XXcpAaoz/lib/python3.10/site-packages/grpclib/protocol.py", line 375, in send_request
self._h2_connection.send_headers(stream_id, headers,
File "/home/coin/.local/share/virtualenvs/sale_project-XXcpAaoz/lib/python3.10/site-packages/h2/connection.py", line 770, in send_headers
frames = stream.send_headers(
File "/home/coin/.local/share/virtualenvs/sale_project-XXcpAaoz/lib/python3.10/site-packages/h2/stream.py", line 881, in send_headers
self._authority = authority_from_headers(headers)
File "/home/coin/.local/share/virtualenvs/sale_project-XXcpAaoz/lib/python3.10/site-packages/h2/utilities.py", line 180, in authority_from_headers
return v.encode('utf-8') if not isinstance(v, bytes) else v
AttributeError: 'NoneType' object has no attribute 'encode'
已经使用docker在本地启动了: 03:14:42 VERB MemoryCard set(PUPPET_WECHAT, [object Object],[object Object],[object Object])
03:14:42 VERB MemoryCard save() to StorageFile</wechaty/python-wechaty-xxx.memory-card.json>
03:14:42 VERB StorageFile save() to /wechaty/python-wechaty-xxx.memory-card.json
03:14:42 INFO IoClient [5] https://login.weixin.qq.com/l/gfVvTCzsZA==
Online QR Code Image: https://wechaty.js.org/qrcode/https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FgfVvTCzsZA%3D%3D