Bug: 出现异常
Closed this issue · 3 comments
XrVi commented
操作系统
Windows
Python 版本
3.10.7
NoneBot 版本
1.4.1
Bilichat 版本
1.0.3
描述问题
附在AI总结下面出现这行错误,而且AI视频有时可以成功生成,有时不会。
BCut-ASR conversion failed: Client error '412 Precondition Failed' for url 'https://member.bilibili.com/x/bcut/rubick-interface/resource/create'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412
插件的配置项
# bilibili
# 对同一视频的响应冷却时间(防止刷屏)
bilichat_cd_time = 120
# 网络请求重试次数
bilichat_neterror_retry = 3
# 是否使用浏览器截图(需要额外依赖)
bilichat_use_browser = True
# 是否开启词云(需要额外依赖)
bilichat_word_cloud = False
# === AI 总结相关 ===
# 官方总结接口
bilichat_official_summary = True
# openai 接口(需要额外依赖)
bilichat_openai_token = sk-XXX
# 网络代理
bilichat_openai_proxy = "http://127.0.0.1:7890/"
bilichat_openai_api_base = "https://api.xxx" # 第三方
截图或日志
08-10 13:37:19 [INFO] nonebot_plugin_bilichat | Subtitle not found, try using BCut-ASR: 1156286988 1641887411
08-10 13:37:20 [ERROR] nonebot_plugin_bilichat | BCut-ASR conversion failed: Client error '412 Precondition Failed' for url 'https://member.bilibili.com/x/bcut/rubick-interface/resource/create'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412
Traceback (most recent call last):
File "<string>", line 15, in <module>
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot\__init__.py", line 335, in run
get_driver().run(*args, **kwargs)
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 186, in run
uvicorn.run(
File "XXX\Desktop\baozi\.venv\lib\site-packages\uvicorn\main.py", line 577, in run
server.run()
File "XXX\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "XXX\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 633, in run_until_complete
self.run_forever()
File "XXX\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "XXX\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 600, in run_forever
self._run_once()
File "XXX\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1896, in _run_once
handle._run()
File "XXX\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher
await _run_matcher(
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot\message.py", line 428, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 850, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 825, in simple_run
await handler(
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot\dependencies\__init__.py", line 94, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot_plugin_bilichat\base_content_parsing.py", line 173, in content_info
subtitle = await content.get_subtitle()
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot_plugin_bilichat\content\video.py", line 87, in get_subtitle
subtitle = await get_subtitle(aid=self.id, cid=cid)
> File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot_plugin_bilichat\lib\video_subtitle.py", line 72, in get_subtitle
asr = await get_bcut_asr(audio)
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot_plugin_bilichat\lib\video_subtitle.py", line 91, in get_bcut_asr
await bcut.upload()
File "XXX\Desktop\baozi\.venv\lib\site-packages\nonebot_plugin_bilichat\lib\bcut_asr.py", line 102, in upload
resp.raise_for_status()
File "XXX\Desktop\baozi\.venv\lib\site-packages\httpx\_models.py", line 761, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '412 Precondition Failed' for url 'https://member.bilibili.com/x/bcut/rubick-interface/resource/create'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412
Well2333 commented
bcut api 是这样的,失败的时候忽略或者自己重试几次就行
XrVi commented
bcut api 是这样的,失败的时候忽略或者自己重试几次就行
每次不管有没有被ai总结图片,都会出现这条报错,有办法关掉吗?
BCut-ASR conversion failed: Client error '412 Precondition Failed' for url 'https://member.bilibili.com/x/bcut/rubick-interface/resource/create'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412
Well2333 commented
bilichat_show_error_msg=false