-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
报错如下:
10-14 21:38:41 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_minesweeper, lineno=112) failed.
Traceback (most recent call last):
File "<string>", line 21, in <module>
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot/__init__.py", line 331, in run
get_driver().run(*args, **kwargs)
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot/drivers/fastapi.py", line 201, in run
uvicorn.run(
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/uvicorn/main.py", line 587, in run
server.run()
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/uvicorn/server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot/message.py", line 476, in check_and_run_matcher
await _run_matcher(
> File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot/message.py", line 428, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot/internal/matcher/matcher.py", line 846, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot/internal/matcher/matcher.py", line 821, in simple_run
await handler(
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot/dependencies/__init__.py", line 113, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot_plugin_minesweeper/__init__.py", line 125, in _
await handle_minesweeper(bot, matcher, event, argv + args)
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot_plugin_minesweeper/__init__.py", line 210, in handle_minesweeper
await send(help_msg, game.draw())
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot_plugin_minesweeper/data_source.py", line 80, in draw
self.draw_label(bg)
File "/home/NightWind-Pindao/.venv/lib/python3.8/site-packages/nonebot_plugin_minesweeper/data_source.py", line 155, in draw_label
text_w, text_h = font.getsize(text)
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels