是我哪里安装错了吗 我运行指令就报错
Closed this issue · 7 comments
WindowsSov8forUs commented
请看日志 error.log
...
File "F:\NoneBot\py3102\.venv\lib\site-packages\nonebot_plugin_steam_info\data_source.py", line 130, in get
return Image.open("res/unknown_avatar.jpg"), parent_id
│ │ └ ''
│ └ <function open at 0x000001EEE19FEA70>
└ <module 'PIL.Image' from 'F:\\NoneBot\\py3102\\.venv\\lib\\site-packages\\PIL\\Image.py'>
File "F:\NoneBot\py3102\.venv\lib\site-packages\PIL\Image.py", line 3277, in open
fp = builtins.open(filename, "rb")
│ │ └ 'F:\\NoneBot\\py3102\\res\\unknown_avatar.jpg'
│ └ <built-in function open>
└ <module 'builtins' (built-in)>
FileNotFoundError: [Errno 2] No such file or directory: 'F:\\NoneBot\\py3102\\res\\unknown_avatar.jpg'
这个是内部资源路径的问题了
WindowsSov8forUs commented
你是通过 nb plugin install
或者包管理器指令安装的吗
Xian0Grem commented
你是通过
nb plugin install
或者包管理器指令安装的吗是的,我用nb plugin install安装了本插件
除此之外我使用了nonebot快速部署包https://github.com/lgc-NB2Dev/nb2-fast-deploy/
系统环境Windows server2022
使用虚拟环境的python3.10.11
zhaomaoniu commented
请说明一下你的bot运行目录和插件目录
Xian0Grem commented
bot运行目录在F:\NoneBot\py3102
插件目录在F:\NoneBot\py3102.venv\Lib\site-packages
启动.bat: pdm run python src/util/run.py
pyproject.toml : plugins = ["nonebot_plugin_steam_info", "nonebot_plugin_session"]
附件是我的目录树,我可能有多余的插件但是我都没有启用
contents.txt
zhaomaoniu commented
请更新插件后重试
Xian0Grem commented
正常运行了 感谢