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

maimaiDX功能加载不正常 #10

Open
asukawaii opened this issue Apr 13, 2024 · 7 comments
Open

maimaiDX功能加载不正常 #10

asukawaii opened this issue Apr 13, 2024 · 7 comments

Comments

@asukawaii
Copy link

以下是日志
04-13 12:35:58 [ERROR] nonebot | Failed to import "maimaidx"
Traceback (most recent call last):
File "F:\go-cqhttp_windows_amd64\Kiba-Kiba-5.0.1\Kiba-Kiba-5.0.1\src\libraries\maimaidx_music.py", line 184, in get_music_list
_total_list[__i]['stats'] = obj_stats['charts'][_total_list[__i].id]
KeyError: '10302'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "F:\go-cqhttp_windows_amd64\Kiba-Kiba-5.0.1\Kiba-Kiba-5.0.1\bot.py", line 27, in
nonebot.load_from_json("plugin-list.json", encoding="utf-8")
File "C:\Users\24420\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\load.py", line 81, in load_from_json
return load_all_plugins(set(plugins), set(plugin_dirs))
File "C:\Users\24420\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\load.py", line 53, in load_all_plugins
return manager.load_all_plugins()
File "C:\Users\24420\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 172, in
load_all_plugins
return set(
File "C:\Users\24420\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 173, in

filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "C:\Users\24420\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 148, in
load_plugin
module = importlib.import_module(
File "C:\Users\24420\AppData\Local\Programs\Python\Python39\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "C:\Users\24420\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 237, in
exec_module
super().exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "F:\go-cqhttp_windows_amd64\Kiba-Kiba-5.0.1\Kiba-Kiba-5.0.1\src\plugins\maimaidx.py", line 14, in
from src.libraries.maimaidx_music import *
File "F:\go-cqhttp_windows_amd64\Kiba-Kiba-5.0.1\Kiba-Kiba-5.0.1\src\libraries\maimaidx_music.py", line 193, in
total_list = get_music_list()
File "F:\go-cqhttp_windows_amd64\Kiba-Kiba-5.0.1\Kiba-Kiba-5.0.1\src\libraries\maimaidx_music.py", line 186, in get_music_list
_total_list[__i]['stats'] = obj_stats['charts']['1']
KeyError: '1'

@asukawaii
Copy link
Author

还有这个
04-13 14:43:24 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
Traceback (most recent call last):
File "F:\go-cqhttp_windows_amd64\Kiba-Kiba-5.0.1\Kiba-Kiba-5.0.1\bot.py", line 27, in
nonebot.load_from_json("plugin-list.json", encoding="utf-8")

@asukawaii
Copy link
Author

我的依赖应该是安装好了的

@Rinfair
Copy link
Owner

Rinfair commented Apr 17, 2024

已收到问题反馈,正在排查~将及时推送修复性更新!

@Rinfair
Copy link
Owner

Rinfair commented Apr 23, 2024

你是否有尝试过clone这个仓库然后运行一遍?因为我无论如何也没法在当前版本复现你这个问题。。。

@asukawaii
Copy link
Author

我clone的是master这个版本,重新运行一遍,以下是完整日志
04-25 01:00:10 [SUCCESS] nonebot | NoneBot is initializing...
04-25 01:00:10 [INFO] nonebot | Current Env: prod
04-25 01:00:10 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_arcaeabot"
04-25 01:00:11 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_imageutils"
04-25 01:00:12 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_petpet"
04-25 01:00:12 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_memes"
04-25 01:00:13 [SUCCESS] nonebot | Succeeded to load plugin "sys" from "src.plugins.sys"
04-25 01:00:13 [SUCCESS] nonebot | Succeeded to load plugin "DicePP" from "src.plugins.DicePP"
04-25 01:00:13 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
Traceback (most recent call last):
File "F:\go-cqhttp_windows_amd64\SuzunoBot-AGLAS-master\bot.py", line 27, in
nonebot.load_from_json("plugin-list.json", encoding="utf-8")
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\load.py", line 92, in load_from_json
return load_all_plugins(set(plugins), set(plugin_dirs))
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\load.py", line 62, in load_all_plugins
return manager.load_all_plugins()
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 175, in load_all_plugins
return set(
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 176, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 145, in load_plugin
module = importlib.import_module(
File "C:\Users\24420\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\24420\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 "F:\go-cqhttp_windows_amd64\SuzunoBot-AGLAS-master\src\plugins\public.py", line 30, in
scheduler = require("nonebot_plugin_apscheduler").scheduler
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\load.py", line 174, in require
plugin = load_plugin(name)
File "C:\Users\24420\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\24420\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\24420\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\24420\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\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_plugin_apscheduler_init
.py", line 3, in
from nonebot import export, get_driver
ImportError: cannot import name 'export' from 'nonebot' (C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_init
.py)
04-25 01:00:13 [ERROR] nonebot | Failed to import "public"
Traceback (most recent call last):
File "F:\go-cqhttp_windows_amd64\SuzunoBot-AGLAS-master\bot.py", line 27, in
nonebot.load_from_json("plugin-list.json", encoding="utf-8")
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\load.py", line 92, in load_from_json
return load_all_plugins(set(plugins), set(plugin_dirs))
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\load.py", line 62, in load_all_plugins
return manager.load_all_plugins()
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 175, in load_all_plugins
return set(
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 176, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 145, in load_plugin
module = importlib.import_module(
File "C:\Users\24420\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\24420\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 "F:\go-cqhttp_windows_amd64\SuzunoBot-AGLAS-master\src\plugins\public.py", line 30, in
scheduler = require("nonebot_plugin_apscheduler").scheduler
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\load.py", line 178, in require
raise RuntimeError(f'Cannot load plugin "{name}"!')
RuntimeError: Cannot load plugin "nonebot_plugin_apscheduler"!
04-25 01:00:13 [SUCCESS] nonebot | Succeeded to load plugin "database" from "src.plugins.database"
04-25 01:00:13 [ERROR] nonebot | Failed to import "maimaidx"
Traceback (most recent call last):
File "F:\go-cqhttp_windows_amd64\SuzunoBot-AGLAS-master\bot.py", line 27, in
nonebot.load_from_json("plugin-list.json", encoding="utf-8")
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\load.py", line 92, in load_from_json
return load_all_plugins(set(plugins), set(plugin_dirs))
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\load.py", line 62, in load_all_plugins
return manager.load_all_plugins()
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 175, in load_all_plugins
return set(
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 176, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 145, in load_plugin
module = importlib.import_module(
File "C:\Users\24420\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\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 241, in exec_module
super().exec_module(module)
File "", line 879, in exec_module
File "", line 1017, in get_code
File "", line 947, in source_to_code
File "", line 241, in _call_with_frames_removed
File "F:\go-cqhttp_windows_amd64\SuzunoBot-AGLAS-master\src\plugins\maimaidx.py", line 583
if response.status_code != 200:
^^
SyntaxError: expected 'except' or 'finally' block
04-25 01:00:13 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_guild_patch"
04-25 01:00:13 [SUCCESS] nonebot | Running NoneBot...
04-25 01:00:13 [INFO] uvicorn | Started server process [12428]
04-25 01:00:13 [INFO] uvicorn | Waiting for application startup.
04-25 01:00:13 [INFO] uvicorn | Application startup complete.
04-25 01:00:13 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:10219 (Press CTRL+C to quit)
04-25 01:00:15 [INFO] uvicorn | ('127.0.0.1', 50505) - "WebSocket /onebot/v11/ws" [accepted]
04-25 01:00:15 [INFO] nonebot | OneBot V11 | Bot 3648427211 connected
04-25 01:00:15 [INFO] websockets | connection open
logger: [Local] [Load] 成功读取本地化文件 ~\Config\localization.xlsx
logger: [Local] [Save] 成功更新本地化文件 ~\Config\localization.xlsx 3648427211
logger: [Local] [ChatLoad] 成功读取本地化文件 ~\Config\chat.xlsx
logger: [Local] [ChatSave] 成功更新自定义对话文件 ~\Config\chat.xlsx 3648427211
logger: [BotConfig] [Load] 成功读取配置文件 ~\Config\config.xlsx
logger: [BotConfig] [Save] 成功更新配置文件 \Config\config.xlsx
logger: ['查询指令: 尚未加载任何资料库', '抽卡指令: 尚未加载任何牌库']
Hi

logger: [NB Adapter] Bot 3648427211 Connected!

@asukawaii
Copy link
Author

其中[ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
ImportError: cannot import name 'export' from 'nonebot' (C:\Users\24420\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_init_.py)
04-25 01:00:13 [ERROR] nonebot | Failed to import "public"
RuntimeError: Cannot load plugin "nonebot_plugin_apscheduler"!
04-25 01:00:13 [ERROR] nonebot | Failed to import "maimaidx"
SyntaxError: expected 'except' or 'finally' block
以上为标红报错

@asukawaii
Copy link
Author

我三个版本都试过了,全都是一样的地方报错,不知道哪里出了问题

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