Ljzd-PRO / nonebot-plugin-mystool

QQ聊天、频道机器人插件 | 米游社工具-每日米游币任务、游戏签到、商品兑换、免抓包登录、原神崩铁便笺提醒
https://pypi.org/project/nonebot-plugin-mystool
MIT License
420 stars 52 forks source link

更新2.3以后会报错 #278

Closed momlucky closed 8 months ago

momlucky commented 8 months ago
03-17 16:14:39 [ERROR] nonebot | Failed to import "nonebot_plugin_saa"
Traceback (most recent call last):
  File "<string>", line 18, in <module>
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\load.py", line 130, in load_from_toml
    return load_all_plugins(plugins, plugin_dirs)
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\load.py", line 64, in load_all_plugins
    return manager.load_all_plugins()
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 176, in load_all_plugins
    return set(
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 177, in <genexpr>
    filter(None, (self.load_plugin(name) for name in self.available_plugins))
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin
    module = importlib.import_module(name)
  File "F:\Anaconda\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 242, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_mystool\__init__.py", line 38, in <module>
    from .utils import CommandBegin
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_mystool\utils\__init__.py", line 1, in <module>
    from .common import *
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_mystool\utils\common.py", line 28, in <module>
    require("nonebot_plugin_saa")
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\load.py", line 179, in require
    plugin = load_plugin(name)
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\load.py", line 39, in load_plugin
    return manager.load_plugin(module_path)
> File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin
    module = importlib.import_module(name)
  File "F:\Anaconda\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 242, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_saa\__init__.py", line 3, in <module>
    from .types import Text as Text
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_saa\types\__init__.py", line 1, in <module>
    from .common_message_segment import Text as Text
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_saa\types\common_message_segment.py", line 5, in <module>
    from ..registries import MessageId
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_saa\registries\__init__.py", line 1, in <module>
    from .receipt import Receipt as Receipt
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_saa\registries\receipt.py", line 7, in <module>
    from .message_id import MessageId
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_saa\registries\message_id.py", line 8, in <module>
    from .meta import SerializationMeta
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_saa\registries\meta.py", line 8, in <module>
    from nonebot.compat import PYDANTIC_V2, ConfigDict, type_validate_python
ModuleNotFoundError: No module named 'nonebot.compat'
03-17 16:14:39 [ERROR] nonebot | Failed to import "nonebot_plugin_mystool"
Traceback (most recent call last):
  File "<string>", line 18, in <module>
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\load.py", line 130, in load_from_toml
    return load_all_plugins(plugins, plugin_dirs)
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\load.py", line 64, in load_all_plugins
    return manager.load_all_plugins()
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 176, in load_all_plugins
    return set(
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 177, in <genexpr>
    filter(None, (self.load_plugin(name) for name in self.available_plugins))
> File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin
    module = importlib.import_module(name)
  File "F:\Anaconda\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\manager.py", line 242, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_mystool\__init__.py", line 38, in <module>
    from .utils import CommandBegin
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_mystool\utils\__init__.py", line 1, in <module>
    from .common import *
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot_plugin_mystool\utils\common.py", line 28, in <module>
    require("nonebot_plugin_saa")
  File "G:\robot\QQbot\.venv\Lib\site-packages\nonebot\plugin\load.py", line 183, in require
    raise RuntimeError(f'Cannot load plugin "{name}"!')
RuntimeError: Cannot load plugin "nonebot_plugin_saa"!
Ljzd-PRO commented 8 months ago

之前用的是什么版本呢

momlucky commented 8 months ago

之前用的是什么版本呢

2.0.0

momlucky commented 8 months ago

之前用的是什么版本呢

2.0.0除了偶尔会签到失败一两次,基本稳定运行

Ljzd-PRO commented 8 months ago

ModuleNotFoundError: No module named 'nonebot.compat',可能是 nonebot 需要更新,这个是 Pydantic 版本兼容层模块

momlucky commented 8 months ago

ModuleNotFoundError: No module named 'nonebot.compat',可能是 nonebot 需要更新,这个是 Pydantic 版本兼容层模块

已经是最新了 image

momlucky commented 8 months ago

ModuleNotFoundError: No module named 'nonebot.compat',可能是 nonebot 需要更新,这个是 Pydantic 版本兼容层模块

解决了,确实是版本问题,我之前更新没进虚拟环境,似乎没生效?