Passerby-D / nonebot_plugin_note

12 stars 3 forks source link

记事列表功能无法使用 #12

Open RogerNoROG opened 1 year ago

RogerNoROG commented 1 year ago

Traceback (most recent call last): File "", line 25, in File "/home/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/nonebot/init.py", line 309, in run get_driver().run(*args, **kwargs) File "/home/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 198, in run uvicorn.run( File "/home/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/uvicorn/main.py", line 578, in run server.run() File "/home/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/uvicorn/server.py", line 61, 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/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/nonebot/message.py", line 141, in _check_matcher await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "/home/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/nonebot/message.py", line 187, in _run_matcher await matcher.run(bot, event, state, stack, dependency_cache) File "/home/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 753, in run await self.simple_run(bot, event, state, stack, dependency_cache) File "/home/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 728, in simple_run await handler( File "/home/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/nonebot/dependencies/init.py", line 108, in call return await cast(Callable[..., Awaitable[R]], self.call)(**values) File "/home/rogernorog/zjut-mc-bot/.venv/lib/python3.10/site-packages/nonebot_pluginnote/init.py", line 1189, in name=info.get('nickname') AttributeError: 'NoneType' object has no attribute 'get'

单独使用 /记事列表 功能时就报错 是我使用方法不对吗?

Passerby-D commented 1 year ago

我这边试了没有这个情况 看报错好像是info=await nonebot.get_bot().call_api("get_stranger_info",user_id=id)没有get到这个id的信息,可能最近有什么更新我不知道( 如果只有这个有问题的话,其实你可以把这两行还有下面的name删掉就行了,这个只是为了列出来的时候多个name好看一点,删掉没什么影响