nonebot-bison icon indicating copy to clipboard operation
nonebot-bison copied to clipboard

【报错】b站添加订阅报错

Open mengluo04 opened this issue 5 months ago • 0 comments

环境

  • nonebot-bison 版本:latest
  • nonebot 版本: latest
  • 安装方式:(以下方式的一种或者其他方式) nb 插件方式
  • 操作系统: unbuntu 24.04

问题

使用命令或后台添加订阅都报错

日志

08-29 16:08:56 [INFO] uvicorn | 171.214.198.178:45669 - "GET /bison/api/target_name?platformName=bilibili&target=https://space.bilibili.com/401742377 HTTP/1.1" 500
08-29 16:08:56 [ERROR] uvicorn | Exception in ASGI application

Traceback (most recent call last):
  File "<string>", line 21, in <module>
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/nonebot/__init__.py", line 335, in run
    get_driver().run(*args, **kwargs)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 186, in run
    uvicorn.run(
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/uvicorn/main.py", line 577, in run
    server.run()
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
> File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/routing.py", line 754, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/routing.py", line 774, in app
    await route.handle(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/routing.py", line 483, in handle
    await self.app(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/routing.py", line 754, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/routing.py", line 774, in app
    await route.handle(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/routing.py", line 295, in handle
    await self.app(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/starlette/routing.py", line 74, in app
    response = await f(request)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 297, in app
    raw_response = await run_endpoint_function(
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 210, in run_endpoint_function
    return await dependant.call(**values)
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/nonebot_bison/admin_page/api.py", line 144, in get_target_name
    return {"targetName": await check_sub_target(platformName, T_Target(target))}
  File "/home/services/nb-bot/.venv/lib/python3.10/site-packages/nonebot_bison/apis.py", line 9, in check_sub_target
    scheduler = scheduler_dict[scheduler_conf_class]
KeyError: <class 'nonebot_bison.platform.bilibili.scheduler.BilibiliSite'>
  • [X] 我搜索过了 issue,但是并没有发现过与我类似的问题
  • [X] 我确认在日志中去掉了敏感信息

mengluo04 avatar Aug 29 '24 08:08 mengluo04