无法加载插件
Closed this issue · 4 comments
01-06 10:30:40 [ERROR] nonebot | Failed to import "nonebot_plugin_arcaea"
Traceback (most recent call last):
File "bot.py", line 50, in
nonebot.run(app="bot:app")
File "C:\Program Files\python\lib\site-packages\nonebot_init_.py", line 227, in run
get_driver().run(host, port, *args, **kwargs)
File "C:\Program Files\python\lib\site-packages\nonebot\drivers\fastapi.py", line 170, in run
uvicorn.run(app or self.server_app,
File "C:\Program Files\python\lib\site-packages\uvicorn\main.py", line 386, in run
server.run()
File "C:\Program Files\python\lib\site-packages\uvicorn\server.py", line 49, in run
loop.run_until_complete(self.serve(sockets=sockets))
File "C:\Program Files\python\lib\asyncio\base_events.py", line 603, in run_until_complete
self.run_forever()
File "C:\Program Files\python\lib\asyncio\base_events.py", line 570, in run_forever
self._run_once()
File "C:\Program Files\python\lib\asyncio\base_events.py", line 1859, in _run_once
handle._run()
File "C:\Program Files\python\lib\asyncio\events.py", line 81, in _run
self._context.run(self._callback, *self.args)
File "C:\Program Files\python\lib\site-packages\uvicorn\server.py", line 56, in serve
config.load()
File "C:\Program Files\python\lib\site-packages\uvicorn\config.py", line 308, in load
self.loaded_app = import_from_string(self.app)
File "C:\Program Files\python\lib\site-packages\uvicorn\importer.py", line 20, in import_from_string
module = importlib.import_module(module_str)
File "C:\Program Files\python\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\Users\Administrator\Desktop\bai-bot\bot.py", line 36, in
nonebot.load_plugin("nonebot_plugin_arcaea")
File "C:\Program Files\python\lib\site-packages\nonebot\plugin_init.py", line 960, in load_plugin
return context.run(_load_plugin, manager, module_path)
File "C:\Program Files\python\lib\site-packages\nonebot\plugin_init_.py", line 929, in load_plugin
module = manager.load_plugin(plugin_name)
File "C:\Program Files\python\lib\site-packages\nonebot\plugin\manager.py", line 148, in load_plugin
return importlib.import_module(name)
File "C:\Program Files\python\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in find_and_load
File "", line 975, in find_and_load_unlocked
File "", line 671, in load_unlocked
File "C:\Program Files\python\lib\site-packages\nonebot\plugin\manager.py", line 221, in exec_module
super().exec_module(module)
File "", line 783, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\Program Files\python\lib\site-packages\nonebot_plugin_arcaea_init.py", line 1, in
from . import main
File "C:\Program Files\python\lib\site-packages\nonebot_plugin_arcaea\main.py", line 2, in
from . import handlers
File "C:\Program Files\python\lib\site-packages\nonebot_plugin_arcaea\handlers_init.py", line 1, in
from .info import info_handler
File "C:\Program Files\python\lib\site-packages\nonebot_plugin_arcaea\handlers\info.py", line 11, in
from ..api import ArcApiPlus
File "C:\Program Files\python\lib\site-packages\nonebot_plugin_arcaea\api_init.py", line 1, in
from .resolver import QueryResolver as ArcApiPlus
File "C:\Program Files\python\lib\site-packages\nonebot_plugin_arcaea\api\resolver.py", line 3, in
from .base import APIQueryBase
File "C:\Program Files\python\lib\site-packages\nonebot_plugin_arcaea\api_base.py", line 7, in
class APIQueryBase(abc.ABC):
File "C:\Program Files\python\lib\site-packages\nonebot_plugin_arcaea\api_base.py", line 37, in APIQueryBase
async def songalias(songid: str) -> list[str]:
TypeError: 'type' object is not subscriptable
01-06 10:30:40 [INFO] uvicorn | Started server process [3424]
01-06 10:30:40 [INFO] uvicorn | Waiting for application startup.
C:\Program Files\python\lib\site-packages\apscheduler\triggers\cron_init.py:146: PytzUsageWarning: The normalize met
hod is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a
PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return self.timezone.normalize(dateval + difference), fieldnum
C:\Program Files\python\lib\site-packages\apscheduler\triggers\cron_init.py:159: PytzUsageWarning: The localize meth
od is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a P
EP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return self.timezone.localize(datetime(**values))
求大佬解答
你可以拉取 master 源码安装
好的,稍后我试试
目前的 API 源应该是不可用的,我这几天更新一下
顺带更新 nonebot2 到 beta1