报错:
01-10 23:56:20 [INFO] nonebot_plugin_htmlrender | 使用 chromium 启动
01-10 23:56:20 [ERROR] uvicorn | Traceback (most recent call last):
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/nonebot_plugin_htmlrender/browser.py", line 38, in init
_browser = await launch_browser(**kwargs)
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/nonebot_plugin_htmlrender/browser.py", line 56, in launch_browser
return await _playwright.chromium.launch(**kwargs)
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/async_api/_generated.py", line 14007, in launch
await self._impl_obj.launch(
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/_impl/_browser_type.py", line 93, in launch
Browser, from_channel(await self._channel.send("launch", params))
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 44, in send
return await self._connection.wrap_api_call(
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 419, in wrap_api_call
return await cb()
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 79, in inner_send
result = next(iter(done)).result()
playwright._impl._api_types.Error: Executable doesn't exist at /home/ljzd/.cache/ms-playwright/chromium-1041/chrome-linux/chrome
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/starlette/routing.py", line 671, in lifespan
async with self.lifespan_context(app):
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/starlette/routing.py", line 566, in __aenter__
await self._router.startup()
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/starlette/routing.py", line 648, in startup
await handler()
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/nonebot_plugin_htmlrender/__init__.py", line 25, in init
browser = await get_browser(**kwargs)
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/nonebot_plugin_htmlrender/browser.py", line 60, in get_browser
return _browser or await init(**kwargs)
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/nonebot_plugin_htmlrender/browser.py", line 41, in init
_browser = await launch_browser(**kwargs)
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/nonebot_plugin_htmlrender/browser.py", line 56, in launch_browser
return await _playwright.chromium.launch(**kwargs)
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/async_api/_generated.py", line 14007, in launch
await self._impl_obj.launch(
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/_impl/_browser_type.py", line 93, in launch
Browser, from_channel(await self._channel.send("launch", params))
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 44, in send
return await self._connection.wrap_api_call(
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 419, in wrap_api_call
return await cb()
File "/home/ljzd/anaconda3/envs/nonebot/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 79, in inner_send
result = next(iter(done)).result()
playwright._impl._api_types.Error: Executable doesn't exist at /home/ljzd/.cache/ms-playwright/chromium-1041/chrome-linux/chrome
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝
01-10 23:56:20 [ERROR] uvicorn | Application startup failed. Exiting.
在腾讯云服务器上安装插件时遇到,安装的插件名为“和风天气”和“b站用户信息查询”,
解决方法:
**发现安装目录 /ms-playwright/ 下只有个 INSTALLATION_COMPLETE。
把安装目录 /ms-playwright/ 给清空了,然后用 playwright install --force 重新安装**
原因分析;在第一次安装时因为速度太慢想开加速,于是ctrl+C打断了安装,导致本地目录下只有一个INSTALLATION_COMPLETE,而再次开始安装却会因为该文件被打断。