HibiKier / zhenxun_bot

基于 Nonebot2 开发,非常可爱的绪山真寻bot
GNU Affero General Public License v3.0
3.39k stars 602 forks source link

戳一戳不弹语音/图片 #402

Closed Su-Dream closed 2 years ago

Su-Dream commented 2 years ago

已经排查过的 resources/record下的图片/音频正常 [2022-05-20 11:24:36] [INFO]: 群 xxxxxxxxxxxxx 内 xxxxxxxxxxxxxx 戳了戳 同意Nyaoouo十三次(1439806785) [2022-05-20 11:24:36] [WARNING]: 转换CQ码 ({"type": "record", "data": {"file": "file:///C:\\wwwroot\\106.12.134.24\\zhenxun_bot-0.1.5.3\\resources\\record\\dinggong\\12_\u518d\u89c1\u4e4b\u7c7b\u7684\u8bdd\uff0c\u6211\u624d\u61d2\u5f97\u5bf9\u4f60\u8bf4\u2026_.mp3", "magic": null, "cache": null, "proxy": null, "timeout": null}}) 到MiraiGo Element时出现错误: encode silk failed: convert pcm file error: exec: "ffmpeg": executable file not found in %PATH% 将忽略本段CQ码. [2022-05-20 11:24:36] [WARNING]: 群消息发送失败: 消息为空.

还有时候有时候戳一戳发送文本id:0

Su-Dream commented 2 years ago

`05-20 11:24:36 [ERROR] nonebot | Running matcher <Matcher from plugins.poke, type=notice, priority=5, temp=False> failed. Traceback (most recent call last): File "C:\wwwroot\106.12.134.24\zhenxun_bot-0.1.5.3\bot.py", line 19, in nonebot.run() File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot__init__.py", line 258, in run get_driver().run(*args, *kwargs) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\drivers\fastapi.py", line 168, in run uvicorn.run( File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\uvicorn\main.py", line 463, in run server.run() File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\uvicorn\server.py", line 60, in run return asyncio.run(self.serve(sockets=sockets)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 629, in run_until_complete self.run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 596, in run_forever self._run_once() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1890, in _run_once handle._run() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, self._args) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\message.py", line 153, in _check_matcher await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\message.py", line 202, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\internal\matcher.py", line 668, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\internal\matcher.py", line 635, in simple_run await handler( File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\dependencies__init.py", line 92, in call__ return await self.call(values) File "C:\wwwroot\106.12.134.24\zhenxun_bot-0.1.5.3\plugins\poke__init__.py", line 74, in _pokeevent await poke.send(result) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\internal\matcher.py", line 449, in send return await bot.send(event=event, message=_message, kwargs) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\adapters\onebot\v11\bot.py", line 247, in send return await self.class.send_handler(self, event, message, kwargs) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\adapters\onebot\v11\bot.py", line 175, in send return await bot.send_msg(params) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\adapters\onebot\v11\bot.py", line 208, in call_api return await super().call_api(api, data) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\internal\adapter\bot.py", line 117, in call_api raise exception File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\internal\adapter\bot.py", line 94, in call_api result = await self.adapter._call_api(self, api, data) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\adapters\onebot\v11\adapter.py", line 107, in _call_api return _handle_api_result( File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-i9xW0ubs-py3.9\lib\site-packages\nonebot\adapters\onebot\v11\utils.py", line 81, in _handle_api_result raise ActionFailed(**result) nonebot.adapters.onebot.v11.exception.ActionFailed: <ActionFailed data=None, echo={'seq': 3220}, msg=SEND_MSG_API_ERROR, retcode=100, status=failed, wording=请参考 go-cqhttp 端输出>`

HibiKier commented 2 years ago

https://docs.go-cqhttp.org/guide/quick_start.html#%E5%AE%89%E8%A3%85-ffmpeg

Su-Dream commented 2 years ago

https://docs.go-cqhttp.org/guide/quick_start.html#%E5%AE%89%E8%A3%85-ffmpeg

感谢回答,这就去试试