File "/home/Neko/QQBot/zhenxun_bot/bot.py", line 21, in
nonebot.run()
│ └ <function run at 0x7f9b5700bd00>
└ <module 'nonebot' from '/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/noneb...
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/init.py", line 273, in run
get_driver().run(*args, **kwargs)
│ │ └ {}
│ └ ()
└ <function get_driver at 0x7f9b5700b640>
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 172, in run
uvicorn.run(
│ └ <function run at 0x7f9b55c7e680>
└ <module 'uvicorn' from '/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/uvico...
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/uvicorn/main.py", line 569, in run
server.run()
│ └ <function Server.run at 0x7f9b55c7e830>
└ <uvicorn.server.Server object at 0x7f9a695648b0>
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
│ │ │ │ └ None
│ │ │ └ <function Server.serve at 0x7f9b55c7e8c0>
│ │ └ <uvicorn.server.Server object at 0x7f9a695648b0>
│ └ <function run at 0x7f9b58149630>
└ <module 'asyncio' from '/usr/lib/python3.10/asyncio/init.py'>
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
│ │ └ <coroutine object Server.serve at 0x7f9a6954e2d0>
│ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects>
└
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/message.py", line 142, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function _command at 0x7f9b56cf3640>: <Task finished name='Task-398882' coro=<_command() done, defined at /home/Neko/.cache...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7f9a6929c160>
│ │ │ │ └ {'_prefix': {'command': ('签到',), 'raw_command': '签到', 'command_arg': [], 'command_start': ''}, '_matched': '签到', '_matched_gr...
│ │ │ └ GroupMessageEvent(time=1678631441, self_id=3042447114, post_type='message', sub_type='normal', user_id=3420224707, message_ty...
│ │ └ Bot(type='OneBot V11', self_id='3042447114')
│ └ Matcher(type='message', module=plugins.sign_in)
└ <function _run_matcher at 0x7f9b56c3ab00>
File "/home/Neko/QQBot/zhenxun_bot/bot.py", line 15, in
nonebot.load_plugins("extensive_plugin")
│ └ <function load_plugins at 0x7fcd7fe565f0>
└ <module 'nonebot' from '/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/noneb...
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/load.py", line 45, in load_plugins
return manager.load_all_plugins()
│ └ <function PluginManager.load_all_plugins at 0x7fcd7fe55ab0>
└ PluginManager(plugins=set(), search_path={'extensive_plugin'})
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 168, in load_all_plugins
return set(
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 169, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
│ │ │ │ │ └ <property object at 0x7fcd7fe588b0>
│ │ │ │ └ PluginManager(plugins=set(), search_path={'extensive_plugin'})
│ │ │ └ 'zhenxun_plugins_TZseries'
│ │ └ 'zhenxun_plugins_TZseries'
│ └ <function PluginManager.load_plugin at 0x7fcd7fe55a20>
└ PluginManager(plugins=set(), search_path={'extensive_plugin'})
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 145, in load_plugin
module = importlib.import_module(
│ └ <function import_module at 0x7fcd816acdc0>
└ <module 'importlib' from '/usr/lib/python3.10/importlib/init.py'>
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'extensive_plugin.zhenxun_plugins_TZseries'
│ └ <function _gcd_import at 0x7fcd81763400>
└ <module '_frozen_importlib' (frozen)>
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 "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
└ <module 'extensive_plugin.zhenxun_plugins_TZseries' from '/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_plugins_TZser...
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_plugins_TZseries/init.py", line 2, in
nonebot.load_plugins("extensive_plugin/zhenxun_plugins_TZseries")
│ └ <function load_plugins at 0x7fcd7fe565f0>
└ <module 'nonebot' from '/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/noneb...
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/load.py", line 45, in load_plugins
return manager.load_all_plugins()
│ └ <function PluginManager.load_all_plugins at 0x7fcd7fe55ab0>
└ PluginManager(plugins=set(), search_path={'extensive_plugin/zhenxun_plugins_TZseries'})
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 168, in load_all_plugins
return set(
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 169, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
│ │ │ │ │ └ <property object at 0x7fcd7fe588b0>
│ │ │ │ └ PluginManager(plugins=set(), search_path={'extensive_plugin/zhenxun_plugins_TZseries'})
│ │ │ └ 'TZbank'
│ │ └ 'TZbank'
│ └ <function PluginManager.load_plugin at 0x7fcd7fe55a20>
└ PluginManager(plugins=set(), search_path={'extensive_plugin/zhenxun_plugins_TZseries'})
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 145, in load_plugin
module = importlib.import_module(
│ └ <function import_module at 0x7fcd816acdc0>
└ <module 'importlib' from '/usr/lib/python3.10/importlib/init.py'>
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'extensive_plugin.zhenxun_plugins_TZseries.TZbank'
│ └ <function _gcd_import at 0x7fcd81763400>
└ <module '_frozen_importlib' (frozen)>
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 "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
└ <module 'extensive_plugin.zhenxun_plugins_TZseries.TZbank' from '/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_plugin...
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_plugins_TZseries/TZbank.py", line 11, in
from ._model import TZtreasury, TZBank
File "/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_plugins_TZseries/_model.py", line 8, in
from services.db_context import db
ImportError: cannot import name 'db' from 'services.db_context' (/home/Neko/QQBot/zhenxun_bot/services/db_context.py)
系统版本:Arch 6.2.2-arch2-1
真寻版本:0.1.6.7
错误截图
日志截图
03-12 22:30:19 [ERROR] nonebot | Running Matcher(type='message', module=plugins.sign_in) failed. Traceback (most recent call last):
File "/home/Neko/QQBot/zhenxun_bot/bot.py", line 21, in
nonebot.run()
│ └ <function run at 0x7f9b5700bd00>
└ <module 'nonebot' from '/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/noneb...
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/init.py", line 273, in run get_driver().run(*args, **kwargs) │ │ └ {} │ └ () └ <function get_driver at 0x7f9b5700b640> File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 172, in run uvicorn.run( │ └ <function run at 0x7f9b55c7e680> └ <module 'uvicorn' from '/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/uvico... File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/uvicorn/main.py", line 569, in run server.run() │ └ <function Server.run at 0x7f9b55c7e830> └ <uvicorn.server.Server object at 0x7f9a695648b0> File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/uvicorn/server.py", line 60, in run return asyncio.run(self.serve(sockets=sockets)) │ │ │ │ └ None │ │ │ └ <function Server.serve at 0x7f9b55c7e8c0> │ │ └ <uvicorn.server.Server object at 0x7f9a695648b0> │ └ <function run at 0x7f9b58149630> └ <module 'asyncio' from '/usr/lib/python3.10/asyncio/init.py'> File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) │ │ └ <coroutine object Server.serve at 0x7f9a6954e2d0> │ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects> └
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/message.py", line 142, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function _command at 0x7f9b56cf3640>: <Task finished name='Task-398882' coro=<_command() done, defined at /home/Neko/.cache...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7f9a6929c160>
│ │ │ │ └ {'_prefix': {'command': ('签到',), 'raw_command': '签到', 'command_arg': [], 'command_start': ''}, '_matched': '签到', '_matched_gr...
│ │ │ └ GroupMessageEvent(time=1678631441, self_id=3042447114, post_type='message', sub_type='normal', user_id=3420224707, message_ty...
│ │ └ Bot(type='OneBot V11', self_id='3042447114')
│ └ Matcher(type='message', module=plugins.sign_in)
└ <function _run_matcher at 0x7f9b56c3ab00>
File "/home/Neko/QQBot/zhenxun_bot/plugins/signin/init.py", line 94, in await group_user_check_in(nickname, event.user_id, event.group_id), │ │ │ │ │ └ 707984972 │ │ │ │ └ GroupMessageEvent(time=1678631441, self_id=3042447114, post_type='message', sub_type='normal', user_id=3420224707, message_ty... │ │ │ └ 3420224707 │ │ └ GroupMessageEvent(time=1678631441, self_id=3042447114, post_type='message', sub_type='normal', user_id=3420224707, message_ty... │ └ '少姜' └ <function group_user_check_in at 0x7f9b16c3bb50>
File "/home/Neko/QQBot/zhenxun_bot/plugins/sign_in/group_user_checkin.py", line 39, in group_user_check_in return await get_card(user, nickname, -1, gold, "") │ │ └ '少姜' │ └ <models.sign_group_user.SignGroupUser object at 0x7f9b4c79e230> └ <function get_card at 0x7f9b16c3bd90>
File "/home/Neko/QQBot/zhenxun_bot/plugins/sign_in/group_user_checkin.py", line 78, in _handle_check_in await BagUser.add_gold(user_qq, group, gold + gift) │ │ │ │ │ └ 35 │ │ │ │ └ 67 │ │ │ └ 707984972 │ │ └ 3420224707 │ └ <classmethod(<function BagUser.add_gold at 0x7f9b20a8b640>)> └ <class 'models.bag_user.BagUser'>
File "/home/Neko/QQBot/zhenxun_bot/models/bag_user.py", line 104, in add_gold
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/api.py", line 137, in first return await self._query.bind.first(self._query, *multiparams, *params) │ │ │ │ │ └ {} │ │ │ │ └ () │ │ │ └ <member '_query' of 'GinoExecutor' objects> │ │ └ <gino.api.GinoExecutor object at 0x7f9b4c79e2f0> │ └ <member '_query' of 'GinoExecutor' objects> └ <gino.api.GinoExecutor object at 0x7f9b4c79e2f0> File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/engine.py", line 748, in first return await conn.first(clause, multiparams, **params) │ │ │ │ └ {} │ │ │ └ () │ │ └ <sqlalchemy.sql.selectable.Select at 0x7f9b4c79d990; Select object> │ └ <function GinoConnection.first at 0x7f9b56479750> └ <gino.engine.GinoConnection object at 0x7f9b516eefb0> File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/engine.py", line 328, in first return await result.execute(one=True) │ └ <function _ResultProxy.execute at 0x7f9a6930e050> └ <gino.dialects.base._ResultProxy object at 0x7f9b516ed840> File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/dialects/base.py", line 214, in execute rows = await cursor.async_execute( │ └ <function DBAPICursor.async_execute at 0x7f9a6930f400> └ <gino.dialects.asyncpg.DBAPICursor object at 0x7f9b516eea10> File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/gino/dialects/asyncpg.py", line 184, in async_execute result, stmt = await getattr(conn, "_do_execute")(query, executor, timeout) │ │ │ └ None │ │ └ <function DBAPICursor.async_execute..executor at 0x7f9b516cd1b0>
│ └ 'SELECT bag_users.id, bag_users.user_qq, bag_users.group_id, bag_users.gold, bag_users.props, bag_users.spend_total_gold, bag...
└ <PoolConnectionProxy [released] 0x7f9b4c79e470>
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/asyncpg/connection.py", line 1710, in _do_execute
stmt = await self._get_statement(
│ └ <function Connection._get_statement at 0x7f9b20a801f0>
└ <asyncpg.connection.Connection object at 0x7f9a692a11c0>
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/asyncpg/connection.py", line 397, in _get_statement
statement = await self._protocol.prepare(
│ └ <member '_protocol' of 'Connection' objects>
└ <asyncpg.connection.Connection object at 0x7f9a692a11c0>
File "asyncpg/protocol/protocol.pyx", line 168, in prepare
return await waiter
asyncpg.exceptions.UndefinedColumnError: column bag_users.props does not exist
这是签到插件的报错
03-12 22:33:20 [ERROR] nonebot | Failed to import "TZbank" Traceback (most recent call last):
File "/home/Neko/QQBot/zhenxun_bot/bot.py", line 15, in
nonebot.load_plugins("extensive_plugin")
│ └ <function load_plugins at 0x7fcd7fe565f0>
└ <module 'nonebot' from '/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/noneb...
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/load.py", line 45, in load_plugins return manager.load_all_plugins() │ └ <function PluginManager.load_all_plugins at 0x7fcd7fe55ab0> └ PluginManager(plugins=set(), search_path={'extensive_plugin'}) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 168, in load_all_plugins return set( File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 169, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
│ │ │ │ │ └ <property object at 0x7fcd7fe588b0>
│ │ │ │ └ PluginManager(plugins=set(), search_path={'extensive_plugin'})
│ │ │ └ 'zhenxun_plugins_TZseries'
│ │ └ 'zhenxun_plugins_TZseries'
│ └ <function PluginManager.load_plugin at 0x7fcd7fe55a20>
└ PluginManager(plugins=set(), search_path={'extensive_plugin'})
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 145, in load_plugin
module = importlib.import_module(
│ └ <function import_module at 0x7fcd816acdc0>
└ <module 'importlib' from '/usr/lib/python3.10/importlib/init.py'>
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'extensive_plugin.zhenxun_plugins_TZseries'
│ └ <function _gcd_import at 0x7fcd81763400>
└ <module '_frozen_importlib' (frozen)>
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 "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
└ <module 'extensive_plugin.zhenxun_plugins_TZseries' from '/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_plugins_TZser...
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_plugins_TZseries/init.py", line 2, in
nonebot.load_plugins("extensive_plugin/zhenxun_plugins_TZseries")
│ └ <function load_plugins at 0x7fcd7fe565f0>
└ <module 'nonebot' from '/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/noneb...
File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/load.py", line 45, in load_plugins return manager.load_all_plugins() │ └ <function PluginManager.load_all_plugins at 0x7fcd7fe55ab0> └ PluginManager(plugins=set(), search_path={'extensive_plugin/zhenxun_plugins_TZseries'}) File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 168, in load_all_plugins return set( File "/home/Neko/.cache/pypoetry/virtualenvs/zhenxun-bot-PzlhPUjk-py3.10/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 169, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
│ │ │ │ │ └ <property object at 0x7fcd7fe588b0>
│ │ │ │ └ PluginManager(plugins=set(), search_path={'extensive_plugin/zhenxun_plugins_TZseries'})
│ │ │ └ 'TZbank'
│ │ └ 'TZbank'
│ └ <function PluginManager.load_plugin at 0x7fcd7fe55a20>
└ PluginManager(plugins=set(), search_path={'extensive_plugin/zhenxun_plugins_TZseries'})
File "/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_plugins_TZseries/TZbank.py", line 11, in
from ._model import TZtreasury, TZBank
File "/home/Neko/QQBot/zhenxun_bot/extensive_plugin/zhenxun_plugins_TZseries/_model.py", line 8, in
from services.db_context import db
ImportError: cannot import name 'db' from 'services.db_context' (/home/Neko/QQBot/zhenxun_bot/services/db_context.py)
这是一个第三方插件的报错(其他插件基本都是这个报错)
错误说明
问问各位佬有没有解决的方法呢