HibiKier/nonebot_plugin_gamedraw

启动时报错 ValueError: Unknown parameter state for function....

CAB-8150 opened this issue · 1 comments

请问这个是为什么?第一次接触bot,自己搞了半天没搞懂

01-22 01:20:15 [ERROR] nonebot | Failed to import "nonebot_plugin_gamedraw"
Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\Scripts\nb.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nb_cli\commands\main.py", line 30, in run
    run_bot(file, app)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nb_cli\handlers\deploy.py", line 19, in run_bot
    module = importlib.import_module(module_name)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\Administrator\Desktop\Notbot\nb2\.\bot.py", line 27, in <module>
    nonebot.load_from_toml("pyproject.toml")
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\plugin\load.py", line 131, in load_from_toml
    return load_all_plugins(plugins, plugin_dirs)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\plugin\load.py", line 71, in load_all_plugins
    return manager.load_all_plugins()
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\plugin\manager.py", line 110, in load_all_plugins
    return set(
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\plugin\manager.py", line 111, in <genexpr>
    filter(None, (self.load_plugin(name) for name in self.list_plugins()))
> File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\plugin\manager.py", line 92, in load_plugin
    module = importlib.import_module(name)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\plugin\manager.py", line 181, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot_plugin_gamedraw\__init__.py", line 24, in <module>
    prts = on_regex(r'.*?方舟[1-9|一][0-9]{0,2}[抽|井]', rule=is_switch('prts'), priority=5, block=True)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot_plugin_gamedraw\rule.py", line 29, in is_switch
    return Rule(_is_switch)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\rule.py", line 98, in __init__
    self.checkers: Set[Dependent[bool]] = set(
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\rule.py", line 101, in <genexpr>
    else Dependent[bool].parse(
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\dependencies\__init__.py", line 130, in parse
    field_info = dependent.parse_param(param_name, param)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\dependencies\__init__.py", line 86, in parse_param
    raise ValueError(
ValueError: Unknown parameter state for function <function is_switch.<locals>._is_switch at 0x000001D8CC43B0D0> with type typing.Dict[typing.Any, typing.Any]

你nb版本多少