部署启动后部分功能(大多数功能)无法使用
Lee0528Hub opened this issue · 0 comments
Task exception was never retrieved
future: <Task finished name='Task-33' coro=<WebsocketClient.handle_message() done, defined at /Ubuntu20.04/Amiya-Bot/core/network/mirai/websocketClient.py:92> exception=OSError('cannot open resource')>
Traceback (most recent call last):
File "/Ubuntu20.04/Amiya-Bot/core/log.py", line 109, in catch
yield
File "/Ubuntu20.04/Amiya-Bot/core/network/mirai/websocketClient.py", line 107, in handle_message
await message_handler(message_data, self)
File "/Ubuntu20.04/Amiya-Bot/core/builtin/messageHandler.py", line 134, in message_handler
reply: Chain = await handler.action(data)
File "/Ubuntu20.04/Amiya-Bot/core/bot.py", line 113, in action
return await self.function(data)
File "/Ubuntu20.04/Amiya-Bot/functions/user.py", line 121, in _
return Chain(data, at=False).image(random.choice(get_face()))
File "/usr/lib/python3.8/random.py", line 290, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Ubuntu20.04/Amiya-Bot/core/network/mirai/websocketClient.py", line 107, in handle_message
await message_handler(message_data, self)
File "/usr/lib/python3.8/contextlib.py", line 189, in aexit
await self.gen.athrow(typ, value, traceback)
File "/Ubuntu20.04/Amiya-Bot/core/log.py", line 117, in catch
await handler(error_message)
File "/Ubuntu20.04/Amiya-Bot/core/network/mirai/websocketClient.py", line 114, in handle_error
chain.text(message.replace(' ', ' '))
File "/Ubuntu20.04/Amiya-Bot/core/builtin/messageChain.py", line 88, in text
self.text_image(text)
File "/Ubuntu20.04/Amiya-Bot/core/builtin/messageChain.py", line 109, in text_image
return self.image(target=create_image(text,
File "/Ubuntu20.04/Amiya-Bot/core/builtin/imageCreator.py", line 136, in create_image
text_obj = TextParser(text, max_seat, color, font_size)
File "/Ubuntu20.04/Amiya-Bot/core/builtin/imageCreator.py", line 34, in init
self.font = ImageFont.truetype(FONT_FILE, font_size)
File "/usr/local/lib/python3.8/dist-packages/PIL/ImageFont.py", line 844, in truetype
return freetype(font)
File "/usr/local/lib/python3.8/dist-packages/PIL/ImageFont.py", line 841, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/usr/local/lib/python3.8/dist-packages/PIL/ImageFont.py", line 193, in init
self.font = core.getfont(
OSError: cannot open resource