python-wechaty
python-wechaty copied to clipboard
🐛🐛 Bug Report: 50M以上文件to_file_box()异常报错退出
requirements
- token type [paimon]
- version of python-wechaty [0.8.33]
Describe your problem
通过paimon协议,将50M文件to_file_box()会异常报错退出,我只想获取文件名称。
Reproduce your problem
if msg.type() == MessageType.MESSAGE_TYPE_ATTACHMENT:
my_file_box = await msg.to_file_box()
file_src =my_file_box.name
Error info
2022-03-28 09:39:16,402 - PuppetService - INFO - receive error info <{'code': 9999, 'msg': "Did not observe any item or terminal signal within 30000ms in 'flatMap' (and no fallback has been configured)"}>
Traceback (most recent call last):
File "D:/Work_Projects/companyinfo/ceshi/ceshi1.py", line 151, in <module>
asyncio.run(main())
File "C:\Python37-32\lib\asyncio\runners.py", line 43, in run
return loop.run_until_complete(main)
File "C:\Python37-32\lib\asyncio\base_events.py", line 587, in run_until_complete
return future.result()
File "D:/Work_Projects/companyinfo/ceshi/ceshi1.py", line 149, in main
await bot.start()
File "C:\Python37-32\lib\site-packages\wechaty\wechaty.py", line 394, in start
await self.puppet.start()
File "C:\Python37-32\lib\site-packages\wechaty_puppet_service\puppet.py", line 929, in start
await self._listen_for_event()
File "C:\Python37-32\lib\site-packages\wechaty_puppet_service\puppet.py", line 1029, in _listen_for_event
payload = EventErrorPayload(**payload_data)
TypeError: __init__() got an unexpected keyword argument 'code'
[2022-03-28 09:39:16,403] ASGI Framework Lifespan error, shutdown without Lifespan support
Traceback (most recent call last):
File "C:\Python37-32\lib\asyncio\runners.py", line 43, in run
return loop.run_until_complete(main)
File "C:\Python37-32\lib\asyncio\base_events.py", line 587, in run_until_complete
return future.result()
File "D:/Work_Projects/companyinfo/ceshi/ceshi1.py", line 149, in main
await bot.start()
File "C:\Python37-32\lib\site-packages\wechaty\wechaty.py", line 394, in start
await self.puppet.start()
File "C:\Python37-32\lib\site-packages\wechaty_puppet_service\puppet.py", line 929, in start
await self._listen_for_event()
File "C:\Python37-32\lib\site-packages\wechaty_puppet_service\puppet.py", line 1029, in _listen_for_event
payload = EventErrorPayload(**payload_data)
TypeError: __init__() got an unexpected keyword argument 'code'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python37-32\lib\site-packages\hypercorn\asyncio\lifespan.py", line 32, in handle_lifespan
await invoke_asgi(self.app, scope, self.asgi_receive, self.asgi_send)
File "C:\Python37-32\lib\site-packages\hypercorn\utils.py", line 247, in invoke_asgi
await app(scope, receive, send)
File "C:\Python37-32\lib\site-packages\quart\app.py", line 1741, in __call__
await self.asgi_app(scope, receive, send)
File "C:\Python37-32\lib\site-packages\quart\app.py", line 1767, in asgi_app
await asgi_handler(receive, send)
File "C:\Python37-32\lib\site-packages\quart\asgi.py", line 308, in __call__
event = await receive()
File "C:\Python37-32\lib\site-packages\hypercorn\asyncio\lifespan.py", line 75, in asgi_receive
return await self.app_queue.get()
File "C:\Python37-32\lib\asyncio\queues.py", line 159, in get
await getter
concurrent.futures._base.CancelledError