Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行报错 #19

Open
NealScx opened this issue Jan 18, 2023 · 9 comments
Open

运行报错 #19

NealScx opened this issue Jan 18, 2023 · 9 comments

Comments

@NealScx
Copy link

NealScx commented Jan 18, 2023

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

@CMHopeSunshine
Copy link
Owner

请更新到最新版

@NealScx
Copy link
Author

NealScx commented Jan 18, 2023

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

@CMHopeSunshine
Copy link
Owner

CMHopeSunshine commented Jan 18, 2023

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

@TsukasaYahane
Copy link

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

@CMHopeSunshine
Copy link
Owner

CMHopeSunshine commented May 13, 2023

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

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

@TsukasaYahane
Copy link

image

@CMHopeSunshine
Copy link
Owner

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

@wling-art
Copy link

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

@CMHopeSunshine
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants