ubuntu下部署nonebot2使用本插件,在使用“菜单”命令后报错
07-11 12:06:49 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_PicMenu) failed.
Traceback (most recent call last):
File "", line 19, in
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot/init.py", line 309, in run
get_driver().run(*args, **kwargs)
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 198, in run
uvicorn.run(
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/uvicorn/main.py", line 578, in run
server.run()
File "/home/ubuntu/nonebots/mybot/.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/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot/message.py", line 467, in check_and_run_matcher
await _run_matcher(
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot/message.py", line 419, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/home/ubuntu/nonebots/mybot/.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/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot/internal/matcher/matcher.py", line 728, in simple_run
await handler(
File "/home/ubuntu/nonebots/mybot/.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/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot_pluginPicMenu/init.py", line 75, in
img = menu_manager.generate_main_menu_image()
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot_plugin_PicMenu/manager.py", line 189, in generate_main_menu_image
return template().generate_main_menu(data)
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot_plugin_PicMenu/template.py", line 83, in generate_main_menu
row_size_list = [tuple(
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot_plugin_PicMenu/template.py", line 84, in
map(lambda _x: calculate_text_size(_x, self.basic_font_size, self.using_font),
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot_plugin_PicMenu/img_tool.py", line 417, in calculate_text_size
return using_font.getsize(text)
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
ubuntu下部署nonebot2使用本插件,在使用“菜单”命令后报错 07-11 12:06:49 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_PicMenu) failed. Traceback (most recent call last): File "", line 19, in
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot/init.py", line 309, in run
get_driver().run(*args, **kwargs)
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot/drivers/fastapi.py", line 198, in run
uvicorn.run(
File "/home/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/uvicorn/main.py", line 578, in run
server.run()
File "/home/ubuntu/nonebots/mybot/.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/ubuntu/nonebots/mybot/.venv/lib/python3.10/site-packages/nonebot/message.py", line 467, in check_and_run_matcher
await _run_matcher(