zifox666 / nonebot-plugin-eve-tool

A NoneBot based plugin provides information query services for EVE online.
GNU General Public License v3.0
6 stars 1 forks source link

数据库问题 #1

Closed shenshangshang closed 2 months ago

shenshangshang commented 2 months ago

大佬,我按照你的方法搭建了这个机器人,别的都没有问题,就是请问这个导入数据库我是去哪里下载吗,没有找到,烦请麻烦您帮下忙

zifox666 commented 2 months ago

第一次初始化的时候自动导入啊

shenshangshang commented 2 months ago

大佬可以麻烦看一下报错吗`使用 Python: /root/mc/eve/.venv/bin/python 09-22 00:26:00 [SUCCESS] nonebot | NoneBot is initializing... 09-22 00:26:00 [INFO] nonebot | Current Env: prod 09-22 00:26:00 [SUCCESS] nonebot | Succeeded to load plugin "echo" from "nonebot.plugins.echo" 09-22 00:26:01 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_apscheduler" 09-22 00:26:01 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_htmlrender" 09-22 00:26:01 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_alconna:uniseg" from "nonebot_plugin_alconna.uniseg" 09-22 00:26:01 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_alconna" Building prefix dict from the default dictionary ... Loading model from cache /tmp/jieba.cache Loading model cost 1.065 seconds. Prefix dict has been built successfully. 09-22 00:26:03 [INFO] nonebot_plugin_eve_tool |


| | | | | | | | || | |
| | | | | | | | | | | | || | | | |
| || | | | | | | | | | || | | | |
| |\ \/ / | | | \ _/ /\ \/ / | _/ \/_/ _/ \/ _/___/

09-22 00:26:03 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_eve_tool" 09-22 00:26:03 [SUCCESS] nonebot | Running NoneBot... 09-22 00:26:03 [INFO] uvicorn | Started server process [2643923] 09-22 00:26:03 [INFO] uvicorn | Waiting for application startup. 09-22 00:26:03 [INFO] nonebot_plugin_apscheduler | Scheduler Started 09-22 00:26:03 [INFO] nonebot_plugin_htmlrender | 使用 chromium 启动 09-22 00:26:03 [INFO] nonebot_plugin_htmlrender | Browser Started. 09-22 00:26:03 [INFO] nonebot_plugin_eve_tool | 成功连接数据库 09-22 00:26:03 [INFO] nonebot_plugin_eve_tool | eve_type数据写入Redis完成 09-22 00:26:03 [ERROR] uvicorn | Traceback (most recent call last): File "/root/mc/eve/.venv/lib/python3.12/site-packages/starlette/routing.py", line 693, in lifespan async with self.lifespan_context(app) as maybe_state: File "/root/project/lee/Python-3.12.1/lib/python3.12/contextlib.py", line 210, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/root/mc/eve/.venv/lib/python3.12/site-packages/nonebot/drivers/fastapi.py", line 153, in _lifespan_manager await self._lifespan.startup() File "/root/mc/eve/.venv/lib/python3.12/site-packages/nonebot/internal/driver/_lifespan.py", line 42, in startup await self._run_lifespan_func(self._startup_funcs) File "/root/mc/eve/.venv/lib/python3.12/site-packages/nonebot/internal/driver/_lifespan.py", line 36, in _run_lifespan_func await cast(ASYNC_LIFESPAN_FUNC, func)() File "/root/mc/eve/.venv/lib/python3.12/site-packages/nonebot_plugin_eve_tool/init.py", line 72, in startup await initialize.init_data(RA, MYSQL) File "/root/mc/eve/.venv/lib/python3.12/site-packages/nonebot_plugin_eve_tool/model/initialize/init.py", line 47, in init_data await load_sde_to_redis(RA, MYSQL) File "/root/mc/eve/.venv/lib/python3.12/site-packages/nonebot_plugin_eve_tool/model/initialize/sde.py", line 20, in load_sde_to_redis eve_type_data = await MYSQL.fetchall( ^^^^^^^^^^^^^^^^^^^^^ File "/root/mc/eve/.venv/lib/python3.12/site-packages/nonebot_plugin_eve_tool/database/mysql/MysqlArray.py", line 115, in fetchall await cur.execute(query, args) File "/root/mc/eve/.venv/lib/python3.12/site-packages/aiomysql/cursors.py", line 239, in execute await self._query(query) File "/root/mc/eve/.venv/lib/python3.12/site-packages/aiomysql/cursors.py", line 457, in _query await conn.query(q) File "/root/mc/eve/.venv/lib/python3.12/site-packages/aiomysql/connection.py", line 469, in query await self._read_query_result(unbuffered=unbuffered) File "/root/mc/eve/.venv/lib/python3.12/site-packages/aiomysql/connection.py", line 683, in _read_query_result await result.read() File "/root/mc/eve/.venv/lib/python3.12/site-packages/aiomysql/connection.py", line 1164, in read first_packet = await self.connection._read_packet() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/mc/eve/.venv/lib/python3.12/site-packages/aiomysql/connection.py", line 652, in _read_packet packet.raise_for_error() File "/root/mc/eve/.venv/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error err.raise_mysql_exception(self._data) File "/root/mc/eve/.venv/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.ProgrammingError: (1146, "Table 'eve_type.eve_type' doesn't exist")

09-22 00:26:03 [ERROR] uvicorn | Application startup failed. Exiting.`

shenshangshang commented 2 months ago

哦我悟了,这个不是单个数据库的密码是整个mysql的密码