Closed lancer-wang closed 2 years ago
nonebot2_miya/omega_miya/plugins/omega_sign_in/utils.py 第335行,应为file://
你是说这一行吗
https://github.com/Ailitonia/omega-miya/blob/8ccfe5cb7bfe5ca5ca0097be3d263ba96747ec28/omega_miya/plugins/omega_sign_in/utils.py#L336
这里是取上面获取用户头像的文件路径
https://github.com/Ailitonia/omega-miya/blob/8ccfe5cb7bfe5ca5ca0097be3d263ba96747ec28/omega_miya/plugins/omega_sign_in/utils.py#L225-L227
而 get_user_head_img_cm 这个方法中使用了 PicEncoder 的 get_file 方法来保存图片
https://github.com/Ailitonia/omega-miya/blob/8ccfe5cb7bfe5ca5ca0097be3d263ba96747ec28/omega_miya/utils/omega_plugin_utils/message_tools.py#L48-L59
get_file 方法返回的是 file url 形式的文件路径
https://github.com/Ailitonia/omega-miya/blob/8ccfe5cb7bfe5ca5ca0097be3d263ba96747ec28/omega_miya/utils/omega_plugin_utils/picture_encoder.py#L51
确实对于不同系统来说 file url 格式有所区别, 这里用 urlparse 解析确实应该会更好
nonebot2_miya/omega_miya/plugins/omega_sign_in/utils.py 第335行,应为file://