You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[PyBot][06:53:54.465][ERROR] [plugin]插件导入失败 "nonebot_plugin_pixivrank_search"
Traceback (most recent call last):
File "/root/Yunzai-Bot/plugins/py-plugin/main.py", line 15, in
yunzai_nonebot.load_plugin(plugin.replace("-", "_"))
File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/plugin/load.py", line 34, in load_plugin
return manager.load_plugin(module_path)
File "/root/Yunzai-Bot/plugins/py-plugin/yunzai_nonebot/hijack/plugin.py", line 16, 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 "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 233, in exec_module
super().exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot_plugin_pixivrank_search/init.py", line 5, in
from .data_source import get_pixiv_urls, download_pixiv_imgs, search_pixiv_urls
File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot_plugin_pixivrank_search/data_source.py", line 5, in
from .config import config
File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot_plugin_pixivrank_search/config.py", line 10, in
config = Config.parse_obj(get_driver().config)
File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/pydantic/main.py", line 526, in parse_obj
return cls(**obj)
File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/pydantic/main.py", line 341, in init
raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for Config
local_proxy
field required (type=value_error.missing)这个报错什么意思
[PyBot][06:53:54.465][ERROR] [plugin]插件导入失败 "nonebot_plugin_pixivrank_search"
Traceback (most recent call last):
File "/root/Yunzai-Bot/plugins/py-plugin/main.py", line 15, in
yunzai_nonebot.load_plugin(plugin.replace("-", "_"))
File "/root/.cache/pypoetry/virtualenvs/py-plugin-8_cve6GP-py3.9/lib/python3.9/site-packages/nonebot/plugin/load.py", line 34, in load_plugin
return manager.load_plugin(module_path)
这个报错是因为 nonebot_plugin_pixivrank_search 插件中的 Config 模型中缺少了必填的 local_proxy 字段。在 config.py 文件中,应该包含 local_proxy 字段的定义,例如:
python
Copy code
class Config(BaseSettings):
search_size: int = 10
local_proxy: Optional[str] = None # 添加这行定义
您需要在 config.py 中添加该字段的定义,或在使用该插件时,传递该字段的值。
The text was updated successfully, but these errors were encountered: