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

nonebot-plugin-guild-patch已经撤包了,希望能移除依赖 #499

Closed
liuzj288 opened this issue May 10, 2024 · 10 comments
Closed

nonebot-plugin-guild-patch已经撤包了,希望能移除依赖 #499

liuzj288 opened this issue May 10, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@liuzj288
Copy link

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

nonebot-plugin-guild-patch已经撤包了,希望能移除依赖

列出安装的 Python 包

No response

如何复现

nonebot-plugin-guild-patch已经撤包了,希望能移除依赖

期望行为

No response

实际行为

nonebot-plugin-guild-patch已经撤包了,希望能移除依赖

@liuzj288 liuzj288 added the bug Something isn't working label May 10, 2024
@liuzj288
Copy link
Author

这样报错 nonebot-plugin-guild-patch

https://registry.nonebot.dev/plugin/ELF-RSS:ELF_RSS2

@Quan666
Copy link
Owner

Quan666 commented May 10, 2024

这样报错 nonebot-plugin-guild-patch

https://registry.nonebot.dev/plugin/ELF-RSS:ELF_RSS2

你会改吗?要不你帮忙改一下

@liuzj288
Copy link
Author

liuzj288 commented May 10, 2024

这样报错 nonebot-plugin-guild-patch
https://registry.nonebot.dev/plugin/ELF-RSS:ELF_RSS2

你会改吗?要不你帮忙改一下

今天重新部署卡在这里了,回退版本好像也不行,研究nonebot不是很深入,定位不到原因

05-10 14:29:14 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_apscheduler"
05-10 14:29:14 [ERROR] nonebot | Failed to import "nonebot_plugin_guild_patch"
Traceback (most recent call last):
File "C:\Users\liuzj\Documents\ELF_RSS\bot.py", line 8, in
nonebot.load_plugins("src/plugins")
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\load.py", line 51, in load_plugins
return manager.load_all_plugins()
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 203, in load_all_plugins
return set(
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 204, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 169, in load_plugin
module = importlib.import_module(self.searched_plugin_ids[name])
File "C:\Users\liuzj\AppData\Local\Programs\Python\Python310\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 255, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\liuzj\Documents\ELF_RSS\src\plugins\ELF_RSS2_init
.py", line 9, in
require("nonebot_plugin_guild_patch")
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\load.py", line 185, in require
plugin = load_plugin(name)
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\load.py", line 40, in load_plugin
return manager.load_plugin(module_path)

File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 167, in load_plugin
module = importlib.import_module(self.third_party_plugin_ids[name])
File "C:\Users\liuzj\AppData\Local\Programs\Python\Python310\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 255, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot_plugin_guild_patch_init
.py", line 6, in
from .models import (
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot_plugin_guild_patch\models.py", line 30, in
class GuildMessageEvent(MessageEvent):
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot_plugin_guild_patch\models.py", line 50, in GuildMessageEvent
@root_validator(pre=False)
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\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
05-10 14:29:14 [ERROR] nonebot | Failed to import "ELF_RSS2"
Traceback (most recent call last):
File "C:\Users\liuzj\Documents\ELF_RSS\bot.py", line 8, in
nonebot.load_plugins("src/plugins")
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\load.py", line 51, in load_plugins
return manager.load_all_plugins()
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 203, in load_all_plugins
return set(
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 204, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 169, in load_plugin
module = importlib.import_module(self.searched_plugin_ids[name])
File "C:\Users\liuzj\AppData\Local\Programs\Python\Python310\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\manager.py", line 255, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\liuzj\Documents\ELF_RSS\src\plugins\ELF_RSS2_init
.py", line 9, in
require("nonebot_plugin_guild_patch")
File "C:\Users\liuzj\Documents\ELF_RSS\venv\lib\site-packages\nonebot\plugin\load.py", line 188, in require
raise RuntimeError(f'Cannot load plugin "{name}"!')
RuntimeError: Cannot load plugin "nonebot_plugin_guild_patch"!

@Quan666
Copy link
Owner

Quan666 commented May 10, 2024

用docker 装上一个版本试试

@liuzj288
Copy link
Author

这样报错 nonebot-plugin-guild-patch
https://registry.nonebot.dev/plugin/ELF-RSS:ELF_RSS2

你会改吗?要不你帮忙改一下

强行把涉及到guild的代码删除了,现在出现个问题,拼订阅链接的时候出现多了个斜杠

image

image

这个代码是在哪里拼的

@Quan666
Copy link
Owner

Quan666 commented May 10, 2024

Quan666 added a commit that referenced this issue May 10, 2024
* remove: nonebot_plugin_guild_patch #499
@liuzj288
Copy link
Author

https://github.com/Quan666/ELF_RSS/tree/remove-nonebot_plugin_guild_patch

试试这个分支

试了下,自己搭的RSS源还是中间两条杠导致失败,真是奇怪

image

env文件里变量最后是没加/的

image

@Quan666
Copy link
Owner

Quan666 commented May 10, 2024

删掉订阅重新添加

@liuzj288
Copy link
Author

liuzj288 commented May 10, 2024

删掉订阅重新添加

强行改死rss_class.py目前可行

image

image

否则只是删掉订阅重新添加问题依旧

image

@Quan666
Copy link
Owner

Quan666 commented May 10, 2024

你添加订阅的命令什么样的

@Quan666 Quan666 closed this as completed May 16, 2024
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