summerkirakira / CirnoBot

用QQ机器人控制Minecraft服务器!服务器状态查询/服务器白名单/插件列表/玩家查询/转发服务器消息/执行指令... + 实用娱乐功能,三步即可部署的QQ bot
107 stars 17 forks source link

无法启动 #6

Closed Ella-Alinda closed 2 years ago

Ella-Alinda commented 2 years ago

ella@Alinda  ~/CirnoBot   master  nb run 02-16 20:50:02 [SUCCESS] nonebot | NoneBot is initializing... 02-16 20:50:02 [INFO] nonebot | Current Env: prod 02-16 20:50:02 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_apscheduler" 02-16 20:50:02 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_currency_conversion" 02-16 20:50:02 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_cute_message" 02-16 20:50:02 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_database_connector" 02-16 20:50:02 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_image_server" 02-16 20:50:02 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_kaiheila_check" 02-16 20:50:02 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_mc_info" 02-16 20:50:03 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_mc_fun" 02-16 20:50:04 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_mc_cocdicer" 02-16 20:50:04 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_message_recorder" 02-16 20:50:04 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_permission" 02-16 20:50:04 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_archive" 02-16 20:50:04 [SUCCESS] nonebot | Succeeded to import "src.plugins.nonebot_plugin_help" 02-16 20:50:05 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_gocqhttp" /usr/lib/python3.10/site-packages/apscheduler/util.py:95: PytzUsageWarning: The zone attribute is specific to pytz's interface; please migrate to a new time zone provider. For more details on how to do so, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html if obj.zone == 'local': 02-16 20:50:06 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_what2eat" 02-16 20:50:06 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_tarot" 02-16 20:50:06 [ERROR] nonebot | Failed to import "src.plugins.nonebot_plugin_haruka_bot" Traceback (most recent call last): File "/usr/bin/nb", line 8, in sys.exit(main()) File "/usr/lib/python3.10/site-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/usr/lib/python3.10/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/lib/python3.10/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3.10/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3.10/site-packages/click/core.py", line 754, in invoke return __callback(args, **kwargs) File "/usr/lib/python3.10/site-packages/nb_cli/commands/main.py", line 30, in run run_bot(file, app) File "/usr/lib/python3.10/site-packages/nb_cli/handlers/deploy.py", line 19, in run_bot module = importlib.import_module(module_name) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/ella/CirnoBot/./bot.py", line 25, in cirno_util.load_plugins() File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/ella/CirnoBot/./bot.py", line 25, in cirno_util.load_plugins() File "/home/ella/CirnoBot/./cirno_util.py", line 45, in load_plugins nonebot.load_plugin(f"src.plugins.{plugin_name}") File "/usr/lib/python3.10/site-packages/nonebot/plugin/load.py", line 30, in load_plugin return manager.load_plugin(module_path)

File "/usr/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 92, in load_plugin module = importlib.import_module(name) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "/usr/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 181, in exec_module super().exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/ella/CirnoBot/./src/plugins/nonebot_plugin_haruka_bot/init.py", line 10, in from . import plugins # noqa: F401 File "/home/ella/CirnoBot/./src/plugins/nonebot_plugin_haruka_bot/plugins/init.py", line 1, in from . import ( # noqa: F401 File "/home/ella/CirnoBot/./src/plugins/nonebot_plugin_haruka_bot/plugins/at/init.py", line 1, in from . import at_on, at_off # noqa: F401 File "/home/ella/CirnoBot/./src/plugins/nonebot_plugin_haruka_bot/plugins/at/at_on.py", line 9, in from ...database import DB File "/home/ella/CirnoBot/./src/plugins/nonebot_plugin_haruka_bot/database/init.py", line 1, in from .db import DB # noqa: F401 File "/home/ella/CirnoBot/./src/plugins/nonebot_plugin_haruka_bot/database/db.py", line 12, in from ..utils import get_path File "/home/ella/CirnoBot/./src/plugins/nonebot_plugin_haruka_bot/utils/init.py", line 115, in from .browser import get_dynamic_screenshot # noqa File "/home/ella/CirnoBot/./src/plugins/nonebot_plugin_haruka_bot/utils/browser.py", line 9, in from playwright.async_api import Browser, async_playwright ModuleNotFoundError: No module named 'playwright.async_api' 02-16 20:50:06 [SUCCESS] nonebot | Running NoneBot... 02-16 20:50:06 [INFO] uvicorn | Started server process [645376] 02-16 20:50:06 [INFO] uvicorn | Waiting for application startup. /usr/lib/python3.10/site-packages/apscheduler/triggers/cron/init.py:159: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html return self.timezone.localize(datetime(values)) /usr/lib/python3.10/site-packages/apscheduler/triggers/cron/init.py:146: PytzUsageWarning: The normalize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html return self.timezone.normalize(dateval + difference), fieldnum 02-16 20:50:06 [INFO] src | Scheduler Started 02-16 20:50:06 [INFO] src | 图片存储服务器启动成功 02-16 20:50:06 [INFO] nonebot_plugin_gocqhttp | Begin to Download binary from https://download.fastgit.org/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_linux_amd64.tar.gz INFO:waitress:Serving on http://0.0.0.0:4500 02-16 20:50:06 [ERROR] nonebot_plugin_gocqhttp | An error has been caught in function 'startup', process 'MainProcess' (645376), thread 'MainThread' (140229702616896): Traceback (most recent call last): File "/usr/bin/nb", line 8, in sys.exit(main()) File "/usr/lib/python3.10/site-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/usr/lib/python3.10/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/lib/python3.10/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3.10/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3.10/site-packages/click/core.py", line 754, in invoke return __callback(args, kwargs) File "/usr/lib/python3.10/site-packages/nb_cli/commands/main.py", line 30, in run run_bot(file, app) File "/usr/lib/python3.10/site-packages/nb_cli/handlers/deploy.py", line 24, in run_bot nonebot.run(app=f"{module_name}:{app}") File "/usr/lib/python3.10/site-packages/nonebot/init.py", line 300, in run get_driver().run(*args, *kwargs) File "/usr/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 232, in run uvicorn.run( File "/home/ella/.local/lib/python3.10/site-packages/uvicorn/main.py", line 447, in run server.run() File "/home/ella/.local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in run return asyncio.run(self.serve(sockets=sockets)) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/home/ella/.local/lib/python3.10/site-packages/uvicorn/lifespan/on.py", line 84, in main await app(scope, self.receive, self.send) File "/home/ella/.local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in call return await self.app(scope, receive, send) File "/usr/lib/python3.10/site-packages/fastapi/applications.py", line 208, in call await super().call(scope, receive, send) File "/usr/lib/python3.10/site-packages/starlette/applications.py", line 112, in call await self.middleware_stack(scope, receive, send) File "/usr/lib/python3.10/site-packages/starlette/middleware/errors.py", line 146, in call await self.app(scope, receive, send) File "/usr/lib/python3.10/site-packages/starlette/exceptions.py", line 58, in call await self.app(scope, receive, send) File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 645, in call await self.lifespan(scope, receive, send) File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 621, in lifespan async with self.lifespan_context(app): File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 518, in aenter await self._router.startup() File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 598, in startup await handler() File "/usr/lib/python3.10/site-packages/nonebot_plugin_gocqhttp/init.py", line 32, in startup await download_gocq() File "/usr/lib/python3.10/site-packages/nonebot_plugin_gocqhttp/process/download.py", line 56, in download_gocq response.raise_for_status() File "/usr/lib/python3.10/site-packages/httpx/_models.py", line 1510, in raise_for_status raise HTTPStatusError(message, request=request, response=self) httpx.HTTPStatusError: Server error '503 Service Temporarily Unavailable' for url 'https://download.fastgit.org/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_linux_amd64.tar.gz' For more information check: https://httpstatuses.com/503 02-16 20:50:06 [ERROR] uvicorn | Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 621, in lifespan async with self.lifespan_context(app): File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 518, in aenter await self._router.startup() File "/usr/lib/python3.10/site-packages/starlette/routing.py", line 598, in startup await handler() File "/usr/lib/python3.10/site-packages/nonebot_plugin_gocqhttp/init.py", line 32, in startup await download_gocq() File "/home/ella/.local/lib/python3.10/site-packages/loguru/_logger.py", line 1206, in catch_wrapper return await function(args, **kwargs) File "/usr/lib/python3.10/site-packages/nonebot_plugin_gocqhttp/process/download.py", line 56, in download_gocq response.raise_for_status() File "/usr/lib/python3.10/site-packages/httpx/_models.py", line 1510, in raise_for_status raise HTTPStatusError(message, request=request, response=self) httpx.HTTPStatusError: Server error '503 Service Temporarily Unavailable' for url 'https://download.fastgit.org/Mrs4s/go-cqhttp/releases/latest/download/go-cqhttp_linux_amd64.tar.gz' For more information check: https://httpstatuses.com/503

02-16 20:50:06 [ERROR] uvicorn | Application startup failed. Exiting.

summerkirakira commented 2 years ago

这是plugin gocq的一个bug(并且维护者明确说了不会去修)请在bot_config中把gocq的下载地址从fastgit改为github

summerkirakira commented 2 years ago

经测试playwright在3.10下似乎有兼容性问题?请最好降级到Python 3.8或者3.9。