HibiKier / zhenxun_bot

基于 Nonebot2 开发,以 postgresql 作为数据库,非常可爱的绪山真寻bot
GNU Affero General Public License v3.0
3.3k stars 604 forks source link

启动报错 #1507

Closed xuyufenfei closed 8 months ago

xuyufenfei commented 8 months ago

系统版本:Ubuntu 20.04

真寻版本:0.1.6.7

错误截图

File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/tortoise/backends/asyncpg/client.py", line 82, in _translate_exceptions return await func(self, *args, *kwargs) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/tortoise/backends/asyncpg/client.py", line 143, in execute_query rows = await connection.fetch(params) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/asyncpg/connection.py", line 620, in fetch return await self._execute( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/asyncpg/connection.py", line 1658, in execute result, = await self.execute( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/asyncpg/connection.py", line 1683, in execute return await self._do_execute( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/asyncpg/connection.py", line 1710, in _do_execute stmt = await self._get_statement( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/asyncpg/connection.py", line 397, in _get_statement statement = await self._protocol.prepare( File "asyncpg/protocol/protocol.pyx", line 168, in prepare asyncpg.exceptions.UndefinedColumnError: column "user_qq" does not exist HINT: Perhaps you meant to reference the column "group_info_users.user_id".

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/starlette/routing.py", line 671, in lifespan async with self.lifespan_context(app): File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/starlette/routing.py", line 566, in aenter await self._router.startup() File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/starlette/routing.py", line 648, in startup await handler() File "/root/bot/zhenxun_bot-0.1.6.7/plugins/sign_in/utils.py", line 39, in init_image if not await GroupInfoUser.get_or_none(user_qq=114514): File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/tortoise/queryset.py", line 1008, in _execute instance_list = await self._db.executor_class( File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/tortoise/backends/base/executor.py", line 131, in executeselect , raw_results = await self.db.execute_query(query.get_sql()) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/tortoise/backends/base_postgres/client.py", line 34, in _translate_exceptions return await self._translate_exceptions(func, *args, **kwargs) File "/root/.cache/pypoetry/virtualenvs/zhenxun-bot-u8YWFSxi-py3.8/lib/python3.8/site-packages/tortoise/backends/asyncpg/client.py", line 84, in _translate_exceptions raise OperationalError(exc) tortoise.exceptions.OperationalError: column "user_qq" does not exist HINT: Perhaps you meant to reference the column "group_info_users.user_id".

日志截图

[img]

错误说明

发生了xx错误...

HibiKier commented 8 months ago

把sign_in文件替换到最新的

xuyufenfei commented 8 months ago

把sign_in文件替换到最新的

已经通过创建新的数据库解决问题