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

使用docker部署的 ELF_RSS 连接成功缺无法响应消息 #493

Closed
LolitaOT opened this issue Apr 16, 2024 · 9 comments
Closed

使用docker部署的 ELF_RSS 连接成功缺无法响应消息 #493

LolitaOT opened this issue Apr 16, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@LolitaOT
Copy link

ELF_RSS 、 go-cqhttp 、 nonebot 、 Python 版本及操作系统

LLOneBot: 3.22.1
ELF_RSS: docker版本,是 2024-04-13 12:11:55 build的

列出安装的 Python 包

No response

如何复现

使用的宝塔面板拉取的docker镜像并启动的,启动完提示bot链接成功,但是发送指令没有响应,也没报错。
.env.prod 也指定了 SUPERUSERS

期望行为

响应命令

实际行为

04-16 11:31:47 [INFO] uvicorn | Shutting down
04-16 11:31:47 [WARNING] nonebot | OneBot V11 | WebSocket for Bot xxxxxxxxxx closed by peer
04-16 11:31:47 [INFO] websockets | connection closed
04-16 11:31:47 [INFO] uvicorn | Waiting for application shutdown.
04-16 11:31:47 [INFO] nonebot_plugin_apscheduler | Scheduler Shutdown
04-16 11:31:47 [INFO] uvicorn | Application shutdown complete.
04-16 11:31:47 [INFO] uvicorn | Finished server process [15]
04-16 11:31:49 [SUCCESS] nonebot | NoneBot is initializing...
04-16 11:31:49 [INFO] nonebot | Current Env: prod
04-16 11:31:50 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_apscheduler"
04-16 11:31:50 [ERROR] nonebot | Failed to import "nonebot_plugin_guild_patch"
Traceback (most recent call last):
File "/app/bot.py", line 8, in
nonebot.load_plugins("src/plugins")
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/load.py", line 50, in load_plugins
return manager.load_all_plugins()
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 176, in load_all_plugins
return set(
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 177, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 146, in load_plugin
module = importlib.import_module(
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 242, in exec_module
super().exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/app/src/plugins/ELF_RSS2/init.py", line 9, in
require("nonebot_plugin_guild_patch")
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/load.py", line 179, in require
plugin = load_plugin(name)
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/load.py", line 39, in load_plugin
return manager.load_plugin(module_path)

File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 142, in load_plugin
module = importlib.import_module(name)
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 242, in exec_module
super().exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_guild_patch/init.py", line 6, in
from .models import (
File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_guild_patch/models.py", line 30, in
class GuildMessageEvent(MessageEvent):
File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_guild_patch/models.py", line 50, in GuildMessageEvent
@root_validator(pre=False)
File "/usr/local/lib/python3.9/site-packages/pydantic/deprecated/class_validators.py", line 249, in root_validator
raise PydanticUserError(
pydantic.errors.PydanticUserError: If you use @root_validator with pre=False (the default) you MUST specify skip_on_failure=True. Note that @root_validator is deprecated and should be replaced with @model_validator.

For further information visit https://errors.pydantic.dev/2.7/u/root-validator-pre-skip
04-16 11:31:50 [ERROR] nonebot | Failed to import "ELF_RSS2"
Traceback (most recent call last):
File "/app/bot.py", line 8, in
nonebot.load_plugins("src/plugins")
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/load.py", line 50, in load_plugins
return manager.load_all_plugins()
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 176, in load_all_plugins
return set(
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 177, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 146, in load_plugin
module = importlib.import_module(
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 242, in exec_module
super().exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/app/src/plugins/ELF_RSS2/init.py", line 9, in
require("nonebot_plugin_guild_patch")
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/load.py", line 183, in require
raise RuntimeError(f'Cannot load plugin "{name}"!')
RuntimeError: Cannot load plugin "nonebot_plugin_guild_patch"!
04-16 11:31:50 [SUCCESS] nonebot | Running NoneBot...
04-16 11:31:50 [INFO] uvicorn | Started server process [15]
04-16 11:31:50 [INFO] uvicorn | Waiting for application startup.
04-16 11:31:50 [INFO] nonebot_plugin_apscheduler | Scheduler Started
04-16 11:31:50 [INFO] uvicorn | Application startup complete.
04-16 11:31:50 [INFO] uvicorn | Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
04-16 11:31:50 [INFO] uvicorn | ('222.64.146.203', 10256) - "WebSocket /onebot/v11/ws/" [accepted]
04-16 11:31:50 [INFO] nonebot | OneBot V11 | Bot xxxxxxxxxxx connected
04-16 11:31:50 [INFO] websockets | connection open
04-16 11:32:06 [SUCCESS] nonebot | OneBot V11 xxxxxxxxxx | [message.group.normal]: Message -2147482497 from xxxxxxxxx@[群:xxxxxxxxx] '[at:qq=xxxxxxxxx] showall'

@LolitaOT LolitaOT added the bug Something isn't working label Apr 16, 2024
@Quan666
Copy link
Owner

Quan666 commented Apr 16, 2024

nonebot_plugin_guild_patch
这个插件的问题

@LolitaOT
Copy link
Author

我是用docker安装的,有什么办法可以解决这个问题吗?

@Quan666
Copy link
Owner

Quan666 commented Apr 16, 2024

require("nonebot_plugin_guild_patch")

删除这一行试试

@Quan666
Copy link
Owner

Quan666 commented Apr 16, 2024

pip install nonebot-plugin-guild-patch

或者手动安装这个插件

@LolitaOT
Copy link
Author

LolitaOT commented Apr 16, 2024

安装的话提示已存在

pip install nonebot-plugin-guild-patch

Requirement already satisfied: nonebot-plugin-guild-patch in /usr/local/lib/python3.9/site-packages (0.2.3)
Requirement already satisfied: nonebot-adapter-onebot<3.0.0,>=2.1.0 in /usr/local/lib/python3.9/site-packages (from nonebot-plugin-guild-patch) (2.4.3)
Requirement already satisfied: nonebot2<3.0.0,>=2.0.0-beta.1 in /usr/local/lib/python3.9/site-packages (from nonebot-plugin-guild-patch) (2.2.1)
Requirement already satisfied: typing-extensions<5.0.0,>=4.0.0 in /usr/local/lib/python3.9/site-packages (from nonebot-adapter-onebot<3.0.0,>=2.1.0->nonebot-plugin-guild-patch) (4.11.0)
Requirement already satisfied: msgpack<2.0.0,>=1.0.3 in /usr/local/lib/python3.9/site-packages (from nonebot-adapter-onebot<3.0.0,>=2.1.0->nonebot-plugin-guild-patch) (1.0.8)
Requirement already satisfied: pydantic!=2.5.0,!=2.5.1,<3.0.0,>=1.10.0 in /usr/local/lib/python3.9/site-packages (from nonebot-adapter-onebot<3.0.0,>=2.1.0->nonebot-plugin-guild-patch) (2.7.0)
Requirement already satisfied: yarl<2.0.0,>=1.7.2 in /usr/local/lib/python3.9/site-packages (from nonebot2<3.0.0,>=2.0.0-beta.1->nonebot-plugin-guild-patch) (1.9.4)
Requirement already satisfied: loguru<1.0.0,>=0.6.0 in /usr/local/lib/python3.9/site-packages (from nonebot2<3.0.0,>=2.0.0-beta.1->nonebot-plugin-guild-patch) (0.7.2)
Requirement already satisfied: tomli<3.0.0,>=2.0.1 in /usr/local/lib/python3.9/site-packages (from nonebot2<3.0.0,>=2.0.0-beta.1->nonebot-plugin-guild-patch) (2.0.1)
Requirement already satisfied: python-dotenv<2.0.0,>=0.21.0 in /usr/local/lib/python3.9/site-packages (from nonebot2<3.0.0,>=2.0.0-beta.1->nonebot-plugin-guild-patch) (1.0.1)
Requirement already satisfied: pygtrie<3.0.0,>=2.4.1 in /usr/local/lib/python3.9/site-packages (from nonebot2<3.0.0,>=2.0.0-beta.1->nonebot-plugin-guild-patch) (2.5.0)
Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.9/site-packages (from pydantic!=2.5.0,!=2.5.1,<3.0.0,>=1.10.0->nonebot-adapter-onebot<3.0.0,>=2.1.0->nonebot-plugin-guild-patch) (0.6.0)
Requirement already satisfied: pydantic-core==2.18.1 in /usr/local/lib/python3.9/site-packages (from pydantic!=2.5.0,!=2.5.1,<3.0.0,>=1.10.0->nonebot-adapter-onebot<3.0.0,>=2.1.0->nonebot-plugin-guild-patch) (2.18.1)
Requirement already satisfied: multidict>=4.0 in /usr/local/lib/python3.9/site-packages (from yarl<2.0.0,>=1.7.2->nonebot2<3.0.0,>=2.0.0-beta.1->nonebot-plugin-guild-patch) (6.0.5)
Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.9/site-packages (from yarl<2.0.0,>=1.7.2->nonebot2<3.0.0,>=2.0.0-beta.1->nonebot-plugin-guild-patch) (3.7)

@LolitaOT
Copy link
Author

require("nonebot_plugin_guild_patch")

删除这一行试试

删除的话有新的报错,而且还是响应不了消息
04-16 13:25:59 [SUCCESS] nonebot | NoneBot is initializing...
04-16 13:25:59 [INFO] nonebot | Current Env: prod
04-16 13:26:00 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_apscheduler"
04-16 13:26:01 [ERROR] nonebot | Failed to import "ELF_RSS2"
Traceback (most recent call last):
File "/app/bot.py", line 8, in
nonebot.load_plugins("src/plugins")
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/load.py", line 50, in load_plugins
return manager.load_all_plugins()
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 176, in load_all_plugins
return set(
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 177, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 146, in load_plugin
module = importlib.import_module(
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "/usr/local/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 242, in exec_module
super().exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/app/src/plugins/ELF_RSS2/init.py", line 11, in
from . import command
File "/app/src/plugins/ELF_RSS2/command/init.py", line 1, in
from . import (
File "/app/src/plugins/ELF_RSS2/command/add_dy.py", line 15, in
from nonebot_plugin_guild_patch import GUILD_ADMIN, GUILD_OWNER, GuildMessageEvent
File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_guild_patch/init.py", line 6, in
from .models import (
File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_guild_patch/models.py", line 30, in
class GuildMessageEvent(MessageEvent):
File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_guild_patch/models.py", line 50, in GuildMessageEvent
@root_validator(pre=False)
File "/usr/local/lib/python3.9/site-packages/pydantic/deprecated/class_validators.py", line 249, in root_validator
raise PydanticUserError(
pydantic.errors.PydanticUserError: If you use @root_validator with pre=False (the default) you MUST specify skip_on_failure=True. Note that @root_validator is deprecated and should be replaced with @model_validator.

For further information visit https://errors.pydantic.dev/2.7/u/root-validator-pre-skip
04-16 13:26:01 [SUCCESS] nonebot | Running NoneBot...
04-16 13:26:01 [INFO] uvicorn | Started server process [15]
04-16 13:26:01 [INFO] uvicorn | Waiting for application startup.
04-16 13:26:01 [INFO] nonebot_plugin_apscheduler | Scheduler Started
04-16 13:26:01 [INFO] uvicorn | Application startup complete.

@Quan666
Copy link
Owner

Quan666 commented Apr 16, 2024

那你只能降几个版本了

@LolitaOT
Copy link
Author

LolitaOT commented Apr 16, 2024

挨个试了下,docker 的这个 c72c7ae build 是正常的。

@Quan666
Copy link
Owner

Quan666 commented Apr 16, 2024

2.6.21吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants