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

[问题]昨天更新后帮助无法绘制 #486

Closed
luluxiaoyu opened this issue Nov 10, 2023 · 0 comments
Closed

[问题]昨天更新后帮助无法绘制 #486

luluxiaoyu opened this issue Nov 10, 2023 · 0 comments
Labels
question Further information is requested

Comments

@luluxiaoyu
Copy link

确认

  • 我的Bot版本已更新到最新,且已尝试使用nb paimon install更新依赖库
  • 我已查阅文档-常见问题,无相关解决方案
  • 我已确认issue中没有类似的问题或仍然得不到解决

环境信息

  • 系统版本: Windows10 LTSC
  • Python版本: 3.10
  • Nonebot2版本: 2.0.0

问题描述

help无法绘制

问题截图

11-10 10:51:27 [ERROR] nonebot | Running Matcher(type='message', module=LittlePaimon.plugins.plugin_manager, lineno=34) failed.
Traceback (most recent call last):
File "C:\Users\lulu\Desktop\robot\LittlePaimon2\bot.py", line 37, in
nonebot.run(app="mp_main:app", access_log=False)
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\nonebot_init_.py", line 331, in run
get_driver().run(*args, **kwargs)
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\nonebot\drivers\fastapi.py", line 201, in run
uvicorn.run(
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\main.py", line 587, in run
server.run()
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 640, in run_until_complete
self.run_forever()
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 607, in run_forever
self._run_once()
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1922, in _run_once
handle._run()
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher
await _run_matcher(

File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\nonebot\message.py", line 428, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\nonebot\internal\matcher\matcher.py", line 846, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\nonebot\internal\matcher\matcher.py", line 821, in simple_ru
n
await handler(
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\nonebot\dependencies_init
.py", line 113, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\Users\lulu\Desktop\robot\LittlePaimon2\LittlePaimon\plugins\plugin_manager_init_.py", line 157, in _
img = await draw_help(plugin_list)
File "C:\Users\lulu\Desktop\robot\LittlePaimon2\LittlePaimon\plugins\plugin_manager\draw_help.py", line 66, in draw_help
await img.text_box(matcher.pm_description.replace('\n', '^'), (40 + 336 * matcher_group.index(matcher) + 10, 40 + 336 * matcher_group.in
dex(matcher) + matcher_card.width - 22),
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\site-packages\nonebot\utils.py", line 131, in _wrapper
result = await loop.run_in_executor(None, partial(context.run, pfunc))
File "C:\Users\lulu\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\lulu\Desktop\robot\LittlePaimon2\LittlePaimon\utils\image.py", line 220, in text_box
text_height = self.draw.textsize(text, font=font)[1]
AttributeError: 'ImageDraw' object has no attribute 'textsize'

复现步骤[可选]

help指令

@luluxiaoyu luluxiaoyu added the question Further information is requested label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant