CMHopeSunshine / nonebot-plugin-learning-chat

Nonebot2插件,让Bot学习群友的发言和表情包。/ Nonebot2 plugin to learn what your group members say.
GNU Affero General Public License v3.0
155 stars 5 forks source link

运行报错 #19

Open NealScx opened 1 year ago

NealScx commented 1 year ago

01-18 21:42:33 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_repeater) 01-18 21:42:33 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_repeater) running complete 01-18 21:42:33 [ERROR] nonebot | Rule check failed for Matcher(type='message', module=nonebot_plugin_learning_chat). Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/tortoise/backends/sqlite/client.py", line 34, in translateexceptions return await func(self, query, *args) File "/usr/local/lib/python3.9/dist-packages/tortoise/backends/sqlite/client.py", line 117, in execute_insert return (await connection.execute_insert(query, values))[0] File "/usr/local/lib/python3.9/dist-packages/aiosqlite/core.py", line 194, in execute_insert return await self._execute(self._execute_insert, sql, parameters) File "/usr/local/lib/python3.9/dist-packages/aiosqlite/core.py", line 129, in _execute return await future File "/usr/local/lib/python3.9/dist-packages/aiosqlite/core.py", line 102, in run result = function() File "/usr/local/lib/python3.9/dist-packages/aiosqlite/core.py", line 74, in _execute_insert cursor = self._conn.execute(sql, parameters) sqlite3.OperationalError: no such table: message

CMHopeSunshine commented 1 year ago

请更新到最新版

NealScx commented 1 year ago

是0.2.1呀 Installing collected packages: nonebot-plugin-learning-chat Successfully installed nonebot-plugin-learning-chat-0.2.1

CMHopeSunshine commented 1 year ago

可能是别的使用tortoise-orm的插件把本插件的数据库连接给关闭了,或者不明原因在创建数据库文件时创建失败。尝试重启一下?

TsukasaYahane commented 1 year ago

image 0.22版本也是这个问题,初步推断是和nonebot-plugin-chatgpt-plus这个插件产生冲突。发生冲突后在webUI提示 image

CMHopeSunshine commented 1 year ago

image 0.22版本也是这个问题,初步推断是和nonebot-plugin-chatgpt-plus这个插件产生冲突。发生冲突后在webUI提示 image

看了下,这个插件并没有用到数据库,应该与它无关。 能发一下nonebot2fastapi版本号吗,(进入虚拟环境后)pip show nonebot2pip show fastapi

TsukasaYahane commented 1 year ago

image

CMHopeSunshine commented 1 year ago

版本没问题,应该是插件冲突了,tortoise-orm迟迟不发新版,没办法

wling-art commented 1 year ago

so,真的没办法解决了吗,我的也是会发生,重启就断,多重启几次又连上了,属实太影响了

CMHopeSunshine commented 1 year ago

后面会考虑一下把tortoise-orm换成sqlalchemy来解决数据库连接问题,不过不确定已学的数据能否无缝切换。