Lanly109 / headimg_generator

基于HoshinoBot的制作头像相关的表情包插件,移植自nonebot-plugin-petpet
MIT License
54 stars 12 forks source link

[Bug] error: cannot import name 'MessageSegment' from 'hoshino' #59

Open Yoruko-Sugar opened 16 hours ago

Yoruko-Sugar commented 16 hours ago

[2024-12-03 23:26:26,353 nonebot] ERROR: Failed to import and load "hoshino.modules.headimg_generator.config", error: cannot import name 'MessageSegment' from 'hoshino' (C:\Users\Administrator\Desktop\My_Hoshino-main\My_Hoshino-main\hoshino__init.py) [2024-12-03 23:26:26,353 nonebot] ERROR: cannot import name 'MessageSegment' from 'hoshino' (C:\Users\Administrator\Desktop\My_Hoshino-main\My_Hoshino-main\hoshino__init.py) Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin.py", line 419, in _load_plugin module = importlib.import_module(module_path) File "C:\Users\Administrator\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 992, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed 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 "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\Administrator\Desktop\My_Hoshino-main\My_Hoshino-main\hoshino\modules\headimg_generator\init__.py", line 24, in from .depends import split_msg_v11 File "C:\Users\Administrator\Desktop\My_Hoshino-main\My_Hoshino-main\hoshino\modules\headimg_generator\depends.py", line 22, in from .utils import split_text File "C:\Users\Administrator\Desktop\My_Hoshino-main\My_Hoshino-main\hoshino\modules\headimg_generator\utils.py", line 12, in from hoshino import MessageSegment ImportError: cannot import name 'MessageSegment' from 'hoshino' (C:\Users\Administrator\Desktop\My_Hoshino-main\My_Hoshino-main\hoshino\init__.py)

Yoruko-Sugar commented 16 hours ago

请问是我哪里有问题吗,在hoshino的init.py没有找到可以用来导入的MessageSegment