nonebot-plugin-learning-chat icon indicating copy to clipboard operation
nonebot-plugin-learning-chat copied to clipboard

运行报错

Open NealScx opened this issue 2 years ago • 9 comments

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 translate_exceptions_ 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

NealScx avatar Jan 18 '23 13:01 NealScx

请更新到最新版

CMHopeSunshine avatar Jan 18 '23 14:01 CMHopeSunshine

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

NealScx avatar Jan 18 '23 14:01 NealScx

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

CMHopeSunshine avatar Jan 18 '23 16:01 CMHopeSunshine

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

TsukasaYahane avatar May 13 '23 18:05 TsukasaYahane

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

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

CMHopeSunshine avatar May 13 '23 18:05 CMHopeSunshine

image

TsukasaYahane avatar May 14 '23 05:05 TsukasaYahane

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

CMHopeSunshine avatar May 14 '23 06:05 CMHopeSunshine

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

wling-art avatar May 20 '23 19:05 wling-art

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

CMHopeSunshine avatar May 22 '23 14:05 CMHopeSunshine