Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【错误回报】打开hb时会报错但正常运行 #407

Closed
kevinluo6191 opened this issue Jun 30, 2023 · 1 comment
Closed

【错误回报】打开hb时会报错但正常运行 #407

kevinluo6191 opened this issue Jun 30, 2023 · 1 comment

Comments

@kevinluo6191
Copy link

kevinluo6191 commented Jun 30, 2023

运行环境

win10 22H2

HarukaBot 版本

v1.6.0post4

go-cqhttp 版本

1.0.0-rc2

错误描述

不知道发生什么了 报一下错

报错日志(如果有)

07-01 07:24:34 [ERROR] nonebot | Failed to import "haruka_bot"
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\hb.exe_main
.py", line 7, in
sys.exit(main())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\haruka_bot\cli_init
.py", line 14, in run
from .bot import run
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\User\AppData\Local\Programs\Python\Python310\lib\site-packages\haruka_bot\cli\bot.py", line 16, in
nonebot.load_plugin("haruka_bot")
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\load.py", line 37, in load_plugin
return manager.load_plugin(module_path)

File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "C:\Users\User\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 1006, in find_and_load_unlocked
File "", line 688, in load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 241, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\haruka_bot_init
.py", line 9, in
from . import plugins # noqa: F401
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\haruka_bot\plugins_init
.py", line 8, in
from .live import live_off, live_on, live_now # noqa: F401
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\haruka_bot\plugins\live\live_off.py", line 14, in
live_off = on_command("关闭直播", rule=to_me(), priority=5)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\haruka_bot\utils_init.py", line 316, in on_command
return _on_command(plugin_config.haruka_command_prefix + cmd, *args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\on.py", line 306, in on_command
return on_message(
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\on.py", line 149, in on_message
return on("message", *args, **kwargs, _depth=_depth + 1)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\on.py", line 112, in on
module=get_matcher_module(_depth + 1),
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\on.py", line 72, in get_matcher_module
frame = inspect.getouterframes(current_frame)[depth + 1].frame
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\inspect.py", line 1658, in getouterframes
frameinfo = (frame,) + getframeinfo(frame, context)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\inspect.py", line 1628, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\inspect.py", line 829, in getsourcefile
module = getmodule(object, filename)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\inspect.py", line 869, in getmodule
if ismodule(module) and hasattr(module, 'file'):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\inspect.py", line 189, in ismodule
return isinstance(object, types.ModuleType)
TypeError: 'module' object is not callable

@djkcyl
Copy link
Collaborator

djkcyl commented Jul 4, 2023

请使用markdown语法发布log信息或者截图

@djkcyl djkcyl closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants