Closed NAOLIU closed 7 months ago
为什么你不按他说的试试呢
为什么你不按他说的试试呢 发件人: MrNewt @.> 答复: bot-ssttkkl/nonebot-plugin-access-control @.> 日期: 2023年11月17日 星期五 11:57 收件人: bot-ssttkkl/nonebot-plugin-access-control @.> 抄送: Subscribed @.> 主题: [bot-ssttkkl/nonebot-plugin-access-control] click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过
nb orm upgrade
升级数据库后重试. (Issue #16) 11-17 11:55:35 [ERROR] nonebot_plugin_orm | 启动检查失败 11-17 11:55:35 [ERROR] uvicorn | Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in aenter return await anext(self.gen) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\fastapi.py", line 168, in _lifespan_manager await self._lifespan.startup() File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 36, in startup await self._run_lifespan_func(self._startup_funcs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 30, in _run_lifespan_func await cast(ASYNC_LIFESPAN_FUNC, func)() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm__init.py", line 85, in init_orm await greenlet_spawn(migrate.check, alembic_config) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 192, in greenlet_spawn result = context.throw(sys.exc_info()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\migrate.py", line 505, in check script.run_env() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\script\base.py", line 579, in run_env util.load_python_file(self.dir, "env.py") File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 93, in load_python_file module = load_module_py(module_id, path) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 109, in load_module_py spec.loader.exec_module(module) # type: ignore File "", line 883, in exec_module File " arg, kw) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 194, in greenlet_spawn result = context.switch(value) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 68, in do_run_migrations context.run_migrations() File "", line 241, in _call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 84, in await_fallback(run_migrations_online()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 154, in await_fallback return current.driver.switch(awaitable) # type: ignore[no-any-return] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 187, in greenlet_spawn value = await result File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 78, in run_migrations_online await connection.run_sync(do_run_migrations) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\ext\asyncio\engine.py", line 841, in run_sync return await greenlet_spawn(fn, self._proxied, ", line 8, in run_migrations File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\runtime\environment.py", line 938, in run_migrations self.get_context().run_migrations( kw) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\runtime\migration.py", line 612, in run_migrations for step in self._migrations_fn(heads, self): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\migrate.py", line 493, in retrieve_migrations raise click.UsageError("目标数据库未更新到最新迁移. 请通过nb orm upgrade
升级数据库后重试.") click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过nb orm upgrade
升级数据库后重试. 11-17 11:55:35 [ERROR] uvicorn | Application startup failed. Exiting. unhandled exception during asyncio.run() shutdown task: <Task finished name='Task-14' coro=<get_fastest_mirror..head_mirror() done, defined at C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\meme_generator\download.py:24> exception=ConnectError('All connection attempts failed')> anyio._backends._asyncio.ExceptionGroup: 0 exceptions were raised in the task group: … ---------------------------- The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\anyio_core_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 253, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 86, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 63, in handle_async_request stream = await self._connect(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp with map_exceptions(exc_map): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\meme_generator\download.py", line 26, in head_mirror response = await client.head( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1815, in head return await self.request( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1617, in send response = await self._send_handling_auth( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 352, in handle_async_request with map_httpcore_exceptions(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit__ self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed — Reply to this email directly, view it on GitHub<#16>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEEHL4QNFWRIZXRCC2W4TY3YE3OB5AVCNFSM6AAAAAA7PFYYK6VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TQMRTGEYTONA. You are receiving this because you are subscribed to this thread.Message ID: @.***>
我是通过pip install的,输入nb orm upgrade无用 `PS F:\BOT\wenwen\NewtBot> nb orm upgrade Usage: nb [OPTIONS] COMMAND [ARGS]... Try 'nb --help' for help.
Error: No such command 'orm'.`
然后我pip install orm --upgrade之后,加载插件还是报错:
`
11-17 12:00:14 [ERROR] nonebot | Failed to import "nonebot_plugin_orm"
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Scripts\nb.exe__main.py", line 7, in
File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin module = importlib.import_module(name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "
", line 1050, in _gcd_import File " init__.py)", line 1027, in _find_and_load File " ", line 1006, in _find_and_load_unlocked File " ", line 688, in _load_unlocked File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 242, in exec_module super().exec_module(module) File " ", line 883, in exec_module File " ", line 241, in _call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm__init.py", line 20, in from sqlalchemy import URL, Table, MetaData, make_url ImportError: cannot import name 'URL' from 'sqlalchemy' (C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy__init__.py) 11-17 12:00:14 [ERROR] nonebot | Failed to import "nonebot_plugin_access_control" Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Scripts\nb.exe__main.py", line 7, in init__.py", line 7, insys.exit(main()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call return self.main(*args, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main rv = self.invoke(ctx) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke return callback(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\commands\main.py", line 30, in run run_bot(file, app) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\handlers\deploy.py", line 19, in run_bot module = importlib.import_module(module_name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File " init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) 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 "F:\BOT\wenwen\NewtBot.\bot.py", line 76, in nonebot.load_plugin('nonebot_plugin_access_control') File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\load.py", line 39, in load_plugin return manager.load_plugin(module_path) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin module = importlib.import_module(name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib\ ", line 1050, in _gcd_import File " init.py", line 13, in", line 1027, in _find_and_load File " ", line 1006, in _find_and_load_unlocked File " ", line 688, in _load_unlocked File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 242, in exec_module super().exec_module(module) File " ", line 883, in exec_module File " ", line 241, in _call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_access_control\ require("nonebot_plugin_orm") File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\load.py", line 183, in require raise RuntimeError(f'Cannot load plugin "{name}"!') RuntimeError: Cannot load plugin "nonebot_plugin_orm"! 11-17 12:00:14 [SUCCESS] nonebot | Running NoneBot... 11-17 12:00:14 [INFO] uvicorn | Started server process [23528] 11-17 12:00:14 [INFO] uvicorn | Waiting for application startup. 11-17 12:00:14 [INFO] nonebot_plugin_memes | 正在检查资源文件... 11-17 12:00:14 [INFO] nonebot_plugin_apscheduler | Scheduler Started 11-17 12:00:16 [WARNING] nonebot_plugin_fortune | Abort downloading 11-17 12:00:16 [ERROR] uvicorn | Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in aenter__ return await anext(self.gen) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\fastapi.py", line 168, in _lifespan_manager await self._lifespan.startup() File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 36, in startup await self._run_lifespan_func(self._startup_funcs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 30, in _run_lifespan_func await cast(ASYNC_LIFESPAN_FUNC, func)() File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot_plugin_datastore\db.py", line 94, in init_db from .script.command import upgrade File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 242, in exec_module super().exec_module(module) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot_plugin_datastore\from .plugin import PluginData as PluginData File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot_plugin_datastore\plugin.py", line 11, in from sqlalchemy.orm import DeclarativeBase, declared_attr, registry ImportError: cannot import name 'DeclarativeBase' from 'sqlalchemy.orm' (C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\orm\
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\anyio_core_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 253, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 86, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 63, in handle_async_request stream = await self._connect(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp with map_exceptions(exc_map): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\anyio_core_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 253, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 86, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 63, in handle_async_request stream = await self._connect(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp with map_exceptions(exc_map): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\meme_generator\download.py", line 26, in head_mirror response = await client.head( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1815, in head return await self.request( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1617, in send response = await self._send_handling_auth( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 352, in handle_async_request with map_httpcore_exceptions(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed `
11-17 12:00:14 [ERROR] nonebot | Failed to import "nonebot_plugin_orm"
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Scripts\nb.exe__main.py", line 7, in
File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin module = importlib.import_module(name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "
", line 1050, in _gcd_import File " init__.py)", line 1027, in _find_and_load File " ", line 1006, in _find_and_load_unlocked File " ", line 688, in _load_unlocked File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 242, in exec_module super().exec_module(module) File " ", line 883, in exec_module File " ", line 241, in _call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm__init.py", line 20, in from sqlalchemy import URL, Table, MetaData, make_url ImportError: cannot import name 'URL' from 'sqlalchemy' (C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy__init__.py) 11-17 12:00:14 [ERROR] nonebot | Failed to import "nonebot_plugin_access_control" Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Scripts\nb.exe__main.py", line 7, in init__.py", line 7, insys.exit(main()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call return self.main(*args, kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main rv = self.invoke(ctx) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke return callback(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\commands\main.py", line 30, in run run_bot(file, app) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\handlers\deploy.py", line 19, in run_bot module = importlib.import_module(module_name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File " init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) 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 "F:\BOT\wenwen\NewtBot.\bot.py", line 76, in nonebot.load_plugin('nonebot_plugin_access_control') File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\load.py", line 39, in load_plugin return manager.load_plugin(module_path) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin module = importlib.import_module(name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib\ ", line 1050, in _gcd_import File " init.py", line 13, in", line 1027, in _find_and_load File " ", line 1006, in _find_and_load_unlocked File " ", line 688, in _load_unlocked File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 242, in exec_module super().exec_module(module) File " ", line 883, in exec_module File " ", line 241, in _call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_access_control\ require("nonebot_plugin_orm") File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\load.py", line 183, in require raise RuntimeError(f'Cannot load plugin "{name}"!') RuntimeError: Cannot load plugin "nonebot_plugin_orm"! 11-17 12:00:14 [SUCCESS] nonebot | Running NoneBot... 11-17 12:00:14 [INFO] uvicorn | Started server process [23528] 11-17 12:00:14 [INFO] uvicorn | Waiting for application startup. 11-17 12:00:14 [INFO] nonebot_plugin_memes | 正在检查资源文件... 11-17 12:00:14 [INFO] nonebot_plugin_apscheduler | Scheduler Started 11-17 12:00:16 [WARNING] nonebot_plugin_fortune | Abort downloading 11-17 12:00:16 [ERROR] uvicorn | Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in aenter__ return await anext(self.gen) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\fastapi.py", line 168, in _lifespan_manager await self._lifespan.startup() File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 36, in startup await self._run_lifespan_func(self._startup_funcs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 30, in _run_lifespan_func await cast(ASYNC_LIFESPAN_FUNC, func)() File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot_plugin_datastore\db.py", line 94, in init_db from .script.command import upgrade File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\plugin\manager.py", line 242, in exec_module super().exec_module(module) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot_plugin_datastore\from .plugin import PluginData as PluginData File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot_plugin_datastore\plugin.py", line 11, in from sqlalchemy.orm import DeclarativeBase, declared_attr, registry ImportError: cannot import name 'DeclarativeBase' from 'sqlalchemy.orm' (C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\orm\
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\anyio_core_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 253, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 86, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 63, in handle_async_request stream = await self._connect(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp with map_exceptions(exc_map): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\anyio_core_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 253, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 86, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 63, in handle_async_request stream = await self._connect(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp with map_exceptions(exc_map): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\meme_generator\download.py", line 26, in head_mirror response = await client.head( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1815, in head return await self.request( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1617, in send response = await self._send_handling_auth( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 352, in handle_async_request with map_httpcore_exceptions(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed
草,为什么报错代码发出来后字体大小不一样
nonebot-plugin-orm 包名是这个,pip install看看
From: MrNewt @.>
Sent: Friday, November 17, 2023 12:07:19 PM
To: bot-ssttkkl/nonebot-plugin-access-control @.>
Cc: ssttkkl @.>; Comment @.>
Subject: Re: [bot-ssttkkl/nonebot-plugin-access-control] click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过 nb orm upgrade
升级数据库后重试. (Issue #16)
草,为什么报错代码发出来后字体大小不一样
― Reply to this email directly, view it on GitHubhttps://github.com/bot-ssttkkl/nonebot-plugin-access-control/issues/16#issuecomment-1815717403, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEEHL4QM3YVZYJ7TR65XTULYE3PHPAVCNFSM6AAAAAA7PFYYK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJVG4YTONBQGM. You are receiving this because you commented.Message ID: @.***>
nonebot-plugin-orm 包名是这个,pip install看看 … ____ From: MrNewt @.> Sent: Friday, November 17, 2023 12:07:19 PM To: bot-ssttkkl/nonebot-plugin-access-control @.> Cc: ssttkkl @.>; Comment @.> Subject: Re: [bot-ssttkkl/nonebot-plugin-access-control] click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过
nb orm upgrade
升级数据库后重试. (Issue #16) 草,为什么报错代码发出来后字体大小不一样 ― Reply to this email directly, view it on GitHub<#16 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEEHL4QM3YVZYJ7TR65XTULYE3PHPAVCNFSM6AAAAAA7PFYYK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJVG4YTONBQGM. You are receiving this because you commented.Message ID: @.***>
试过了,情况还是一样,现在更严重,就算没有用nonebot-plugin-access-control,整个nonebot也启动不起来了
11-17 12:20:40 [ERROR] nonebot_plugin_orm | 启动检查失败 11-17 12:20:40 [ERROR] uvicorn | Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in __aenter__ return await anext(self.gen) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\fastapi.py", line 168, in _lifespan_manager await self._lifespan.startup() File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\_lifespan.py", line 36, in startup await self._run_lifespan_func(self._startup_funcs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\_lifespan.py", line 30, in _run_lifespan_func await cast(ASYNC_LIFESPAN_FUNC, func)() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\__init__.py", line 85, in init_orm await greenlet_spawn(migrate.check, alembic_config) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 190, in greenlet_spawn result = context.throw(*sys.exc_info()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\migrate.py", line 505, in check script.run_env() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\script\base.py", line 579, in run_env util.load_python_file(self.dir, "env.py") File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 93, in load_python_file module = load_module_py(module_id, path) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 109, in load_module_py spec.loader.exec_module(module) # type: ignore File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 84, in <module> await_fallback(run_migrations_online()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 152, in await_fallback return current.driver.switch(awaitable) # type: ignore[no-any-return] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 185, in greenlet_spawn value = await result File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 78, in run_migrations_online await connection.run_sync(do_run_migrations) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\ext\asyncio\engine.py", line 886, in run_sync return await greenlet_spawn(fn, self._proxied, *arg, **kw) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 192, in greenlet_spawn result = context.switch(value) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 68, in do_run_migrations context.run_migrations() File "<string>", line 8, in run_migrations File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\runtime\environment.py", line 938, in run_migrations self.get_context().run_migrations(**kw) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\runtime\migration.py", line 612, in run_migrations for step in self._migrations_fn(heads, self): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\migrate.py", line 493, in retrieve_migrations raise click.UsageError("目标数据库未更新到最新迁移. 请通过
nb orm upgrade升级数据库后重试.") click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过
nb orm upgrade` 升级数据库后重试.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\anyio_core_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 253, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 86, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 63, in handle_async_request stream = await self._connect(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp with map_exceptions(exc_map): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\meme_generator\download.py", line 26, in head_mirror response = await client.head( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1815, in head return await self.request( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1617, in send response = await self._send_handling_auth( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 352, in handle_async_request with map_httpcore_exceptions(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed`
我pip show一下nonebot-plugin-orm,已经更新到0.5.1版本了
nb orm upgrade还是跑不起来吗(其实我更推荐你去orm那边发issue
From: MrNewt @.>
Sent: Friday, November 17, 2023 12:22:55 PM
To: bot-ssttkkl/nonebot-plugin-access-control @.>
Cc: ssttkkl @.>; Comment @.>
Subject: Re: [bot-ssttkkl/nonebot-plugin-access-control] click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过 nb orm upgrade
升级数据库后重试. (Issue #16)
nonebot-plugin-orm 包名是这个,pip install看看 … ____ From: MrNewt @.> Sent: Friday, November 17, 2023 12:07:19 PM To: bot-ssttkkl/nonebot-plugin-access-control @.> Cc: ssttkkl @.>; Comment @.> Subject: Re: [bot-ssttkkl/nonebot-plugin-access-control] click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过 nb orm upgrade 升级数据库后重试. (Issue #16https://github.com/bot-ssttkkl/nonebot-plugin-access-control/issues/16) 草,为什么报错代码发出来后字体大小不一样 D Reply to this email directly, view it on GitHub<#16 (comment)https://github.com/bot-ssttkkl/nonebot-plugin-access-control/issues/16#issuecomment-1815717403>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEEHL4QM3YVZYJ7TR65XTULYE3PHPAVCNFSM6AAAAAA7PFYYK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJVG4YTONBQGM. You are receiving this because you commented.Message ID: @.***>
试过了,情况还是一样,现在更严重,就算没有用nonebot-plugin-access-control,整个nonebot也启动不起来了
11-17 12:20:40 [ERROR] nonebot_plugin_orm | 启动检查失败 11-17 12:20:40 [ERROR] uvicorn | Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in aenter return await anext(self.gen) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\fastapi.py", line 168, in _lifespan_manager await self._lifespan.startup() File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 36, in startup await self._run_lifespan_func(self._startup_funcs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 30, in _run_lifespan_func await cast(ASYNC_LIFESPAN_FUNC, func)() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm__init__.py", line 85, in init_orm await greenlet_spawn(migrate.check, alembic_config) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 190, in greenlet_spawn result = context.throw(sys.exc_info()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\migrate.py", line 505, in check script.run_env() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\script\base.py", line 579, in run_env util.load_python_file(self.dir, "env.py") File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 93, in load_python_file module = load_module_py(module_id, path) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 109, in load_module_py spec.loader.exec_module(module) # type: ignore File "
11-17 12:20:40 [ERROR] uvicorn | Application startup failed. Exiting. unhandled exception during asyncio.run() shutdown task: <Task finished name='Task-14' coro=<get_fastest_mirror..head_mirror() done, defined at C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\meme_generator\download.py:24> exception=ConnectError('All connection attempts failed')> anyio._backends._asyncio.ExceptionGroup: 0 exceptions were raised in the task group:
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\anyio_core_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 253, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 86, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 63, in handle_async_request stream = await self._connect(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp with map_exceptions(exc_map): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\meme_generator\download.py", line 26, in head_mirror response = await client.head( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1815, in head return await self.request( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1617, in send response = await self._send_handling_auth( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 352, in handle_async_request with map_httpcore_exceptions(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed`
我pip show一下nonebot-plugin-orm,已经更新到0.5.1版本了
― Reply to this email directly, view it on GitHubhttps://github.com/bot-ssttkkl/nonebot-plugin-access-control/issues/16#issuecomment-1815727296, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEEHL4WZI3S3ANC7IPMUJOLYE3RB7AVCNFSM6AAAAAA7PFYYK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJVG4ZDOMRZGY. You are receiving this because you commented.Message ID: @.***>
nb orm upgrade还是跑不起来吗(其实我更推荐你去orm那边发issue … ____ From: MrNewt @.> Sent: Friday, November 17, 2023 12:22:55 PM To: bot-ssttkkl/nonebot-plugin-access-control @.> Cc: ssttkkl @.>; Comment @.> Subject: Re: [bot-ssttkkl/nonebot-plugin-access-control] click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过
nb orm upgrade
升级数据库后重试. (Issue #16) nonebot-plugin-orm 包名是这个,pip install看看 … ____ From: MrNewt @.> Sent: Friday, November 17, 2023 12:07:19 PM To: bot-ssttkkl/nonebot-plugin-access-control @.> Cc: ssttkkl @.>; Comment @.> Subject: Re: [bot-ssttkkl/nonebot-plugin-access-control] click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过 nb orm upgrade 升级数据库后重试. (Issue #16<#16>) 草,为什么报错代码发出来后字体大小不一样 D Reply to this email directly, view it on GitHub<#16 (comment)<#16 (comment)>>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEEHL4QM3YVZYJ7TR65XTULYE3PHPAVCNFSM6AAAAAA7PFYYK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJVG4YTONBQGM. You are receiving this because you commented.Message ID: @.> 试过了,情况还是一样,现在更严重,就算没有用nonebot-plugin-access-control,整个nonebot也启动不起来了 11-17 12:20:40 [ERROR] nonebot_plugin_orm | 启动检查失败 11-17 12:20:40 [ERROR] uvicorn | Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in aenter return await anext(self.gen) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\fastapi.py", line 168, in _lifespan_manager await self._lifespan.startup() File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 36, in startup await self._run_lifespan_func(self._startup_funcs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers_lifespan.py", line 30, in _run_lifespan_func await cast(ASYNC_LIFESPAN_FUNC, func)() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm__init__.py", line 85, in init_orm await greenlet_spawn(migrate.check, alembic_config) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 190, in greenlet_spawn result = context.throw(sys.exc_info()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\migrate.py", line 505, in check script.run_env() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\script\base.py", line 579, in run_env util.load_python_file(self.dir, "env.py") File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 93, in load_python_file module = load_module_py(module_id, path) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 109, in load_module_py spec.loader.exec_module(module) # type: ignore File "", line 883, in exec_module File " @.>", line 241, in _call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 84, in await_fallback(run_migrations_online()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 152, in await_fallback return current.driver.switch(awaitable) # type: ignore[no-any-return] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 185, in greenlet_spawn value = await result File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 78, in run_migrations_online await connection.run_sync(do_run_migrations) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\ext\asyncio\engine.py", line 886, in run_sync return await greenlet_spawn(fn, self._proxied, *arg, kw) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 192, in greenlet_spawn result = context.switch(value) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 68, in do_run_migrations context.run_migrations() File " ", line 8, in run_migrations File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\runtime\environment.py", line 938, in run_migrations self.get_context().run_migrations( kw) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\runtime\migration.py", line 612, in run_migrations for step in self._migrations_fn(heads, self): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\migrate.py", line 493, in retrieve_migrations raise click.UsageError("目标数据库未更新到最新迁移. 请通过 nb orm upgrade升级数据库后重试.") click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过nb orm upgrade升级数据库后重试. 11-17 12:20:40 [ERROR] uvicorn | Application startup failed. Exiting. unhandled exception during asyncio.run() shutdown task: <Task finished name='Task-14' coro=<get_fastest_mirror..head_mirror() done, defined at C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\meme_generator\download.py:24> exception=ConnectError('All connection attempts failed')> anyio._backends._asyncio.ExceptionGroup: 0 exceptions were raised in the task group: The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\anyio_core_sockets.py", line 225, in connect_tcp raise OSError("All connection attempts failed") from cause OSError: All connection attempts failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 253, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 86, in handle_async_request raise exc File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 63, in handle_async_request stream = await self._connect(request) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_async\connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp with map_exceptions(exc_map): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: All connection attempts failed The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\meme_generator\download.py", line 26, in head_mirror response = await client.head( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1815, in head return await self.request( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1530, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1617, in send response = await self._send_handling_auth( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1645, in _send_handling_auth response = await self._send_handling_redirects( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1682, in _send_handling_redirects response = await self._send_single_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_client.py", line 1719, in _send_single_request response = await transport.handle_async_request(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 352, in handle_async_request with map_httpcore_exceptions(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in exit self.gen.throw(typ, value, traceback) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: All connection attempts failed
我pip show一下nonebot-plugin-orm,已经更新到0.5.1版本了 ― Reply to this email directly, view it on GitHub<#16 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEEHL4WZI3S3ANC7IPMUJOLYE3RB7AVCNFSM6AAAAAA7PFYYK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJVG4ZDOMRZGY. You are receiving this because you commented.Message ID: *
我现在把全部插件全部禁用掉,然后单独重装nonebot_plugin_access_control,然后其他插件不启用,然而还是不行,单独加载nonebot_plugin_access_control还是报错
11-17 12:30:24 [SUCCESS] nonebot | NoneBot is initializing... 11-17 12:30:24 [INFO] nonebot | Current Env: prod 11-17 12:30:24 [SUCCESS] nonebot | Succeeded to load plugin "echo" from "nonebot.plugins.echo" 11-17 12:30:24 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_session" 11-17 12:30:24 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_saa" 11-17 12:30:24 [SUCCESS] nonebot | Succeeded to load plugin "ssttkkl_nonebot_utils" 11-17 12:30:24 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_access_control_api" 11-17 12:30:24 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_apscheduler" 11-17 12:30:25 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_localstore" 11-17 12:30:25 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_orm" 11-17 12:30:25 [INFO] nonebot_plugin_access_control | use inmemory rate_limit_token storage 11-17 12:30:25 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_datastore" 11-17 12:30:25 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_access_control" 11-17 12:30:25 [SUCCESS] nonebot | Running NoneBot... 11-17 12:30:25 [INFO] uvicorn | Started server process [47228] 11-17 12:30:25 [INFO] uvicorn | Waiting for application startup. 11-17 12:30:25 [INFO] nonebot_plugin_apscheduler | Scheduler Started 11-17 12:30:25 [ERROR] nonebot_plugin_orm | 启动检查失败 11-17 12:30:25 [ERROR] uvicorn | Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in __aenter__ return await anext(self.gen) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\fastapi.py", line 168, in _lifespan_manager await self._lifespan.startup() File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\_lifespan.py", line 36, in startup await self._run_lifespan_func(self._startup_funcs) File "C:\Users\Administrator\AppData\Roaming\Python\Python310\site-packages\nonebot\drivers\_lifespan.py", line 30, in _run_lifespan_func await cast(ASYNC_LIFESPAN_FUNC, func)() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\__init__.py", line 85, in init_orm await greenlet_spawn(migrate.check, alembic_config) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 190, in greenlet_spawn result = context.throw(*sys.exc_info()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\migrate.py", line 505, in check script.run_env() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\script\base.py", line 579, in run_env util.load_python_file(self.dir, "env.py") File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 93, in load_python_file module = load_module_py(module_id, path) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\util\pyfiles.py", line 109, in load_module_py spec.loader.exec_module(module) # type: ignore File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 84, in <module> await_fallback(run_migrations_online()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 152, in await_fallback return current.driver.switch(awaitable) # type: ignore[no-any-return] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 185, in greenlet_spawn value = await result File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 78, in run_migrations_online await connection.run_sync(do_run_migrations) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\ext\asyncio\engine.py", line 886, in run_sync return await greenlet_spawn(fn, self._proxied, *arg, **kw) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 192, in greenlet_spawn result = context.switch(value) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\templates\generic\env.py", line 68, in do_run_migrations context.run_migrations() File "<string>", line 8, in run_migrations File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\runtime\environment.py", line 938, in run_migrations self.get_context().run_migrations(**kw) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\alembic\runtime\migration.py", line 612, in run_migrations for step in self._migrations_fn(heads, self): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_orm\migrate.py", line 493, in retrieve_migrations raise click.UsageError("目标数据库未更新到最新迁移. 请通过
nb orm upgrade升级数据库后重试.") click.exceptions.UsageError: 目标数据库未更新到最新迁移. 请通过
nb orm upgrade` 升级数据库后重试.
11-17 12:30:25 [ERROR] uvicorn | Application startup failed. Exiting.`
您用的是nonebot-plugin-tortoise-orm吗? 还是说不一样的插件,我nb plugin install nonebot-plugin-orm好像找不到对应的包
您用的是nonebot-plugin-tortoise-orm吗? 还是说不一样的插件,我nb plugin install nonebot-plugin-orm好像找不到对应的包
https://github.com/nonebot/plugin-orm 这个
对了,通过pip升一下nb-cli试试