Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] 出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。 原因:'FreeTypeFont' object has no attribute 'getsize' #1175

Closed
2 of 3 tasks
jgc9527 opened this issue Sep 3, 2023 · 11 comments · Fixed by #1226

Comments

@jgc9527
Copy link

jgc9527 commented Sep 3, 2023

提交 issue 前,请先确认:

  • 我已看过 FAQ,此问题不在列表中
  • 我已看过其他 issue,他们不能解决我的问题
  • 我认为这不是 Mirai 或者 OpenAI 的 BUG

表现
描述 BUG 的表现情况

运行环境:

  • 操作系统:Debian 11
  • Docker: ?
  • 项目版本:2.5.3

复现步骤
描述你是如何触发这个 BUG 的

bot为手动安装

在群聊或私聊里@bot 在Windows系统下安装pip

预期行为
回复 安装步骤

截图
30331dac0587ab6e_edit_29583236397567.png

其他内容
日志
2023-09-03 08:01:27.258 | DEBUG | platforms.onebot_bot:_:181 - 群 聊 消 息 : [CQ:at,qq=25663436844] 在 Wind
ows系 统 下 安 装 pip
2023-09-03 08:01:27.793 | DEBUG | middlewares.concurrentlock:handle_request:25 - [Concurrent] 使 用 Ad
apter 内 部 的 Queue
2023-09-03 08:01:27.794 | DEBUG | middlewares.concurrentlock:handle_request:27 - [Concurrent] 排 队 中 ,
前 面 还 有 0 个 人 !
2023-09-03 08:01:27.794 | DEBUG | middlewares.concurrentlock:handle_request:40 - [Concurrent] 排 队 中 ,
前 面 还 有 0 个 人 !
2023-09-03 08:01:27.794 | DEBUG | middlewares.concurrentlock:handle_request:42 - [Concurrent] 排 到 了 !
2023-09-03 08:01:27.799 | DEBUG | middlewares.timeout:create_timeout_task:61 - [Timeout] 开 始 计 时 ……
^[[B^[[B^[[B2023-09-03 08:01:36.243 | DEBUG | adapter.chatgpt.web:ask:102 - [ChatGPT-Web] b487df8b-7268-4df0-aa6f-75be895447ba - 在 Windows系 统 下 安
装 pip, 你 可 以 按 照 以 下 步 骤 进 行 操 作 :

  1. **下 载 Python安 装 程 序 **:
    首 先 , 确 保 你 已 经 安 装 了 Python。 如 果 没 有 安 装 Python或 者 你 不 确 定 是 否 已 经 安 装 , 可 以 从 Python官 方 网 站 ( https://www.python.org/downloads/windows/) 下 载 最 新版 本 的 Python安 装 程 序 。 选 择 合 适 的 版 本 , 一 般 来 说 , Python 3.x 版 本 是 最 新 的 。
  2. 安 装 Python
    双 击 下 载 的 Python安 装 程 序 , 打 开 安 装 向 导 。 确 保 在 安 装 过 程 中 选 中 了 “Add Python x.x to PATH”选 项 ( x.x代 表 你 下 载 的 Python版 本 号 ) 。 这 个 选 项 会 将 Python添 加 到系 统 的 环 境 变 量 中 , 这 样 你 就 可 以 在 命 令 行 中 使 用 Python和 pip了 。
  3. **验 证 Python安 装 **:
    打 开 命 令 提 示 符 ( Command Prompt) 或 者 PowerShell, 输 入 以 下 命 令 来 验 证 Python是 否 正 确 安 装 :
    python --version
    
    如 果 你 看 到 Python的 版 本 号 , 表 示 Python已 经 成 功 安 装 。
  4. 安 装 pip
    大 多 数 情 况 下 , Python安 装 程 序 会 自 动 安 装 pip。 你 可 以 通 过 以 下 命 令 来 验 证 pip是 否 已 经 安 装 :
    pip --version
    
    如 果 pip已 经 安 装 , 你 会 看 到 pip的 版 本 号 。
  5. **升 级 pip( 可 选 ) **:
    如 果 你 希 望 升 级 pip到 最 新 版 本 , 可 以 使 用 以 下 命 令 :
    python -m pip install --upgrade pip
    

现 在 , 你 已 经 在 Windows系 统 上 成 功 安 装 了 pip。 你 可 以 使 用 pip来 安 装 Python包 和 库 , 管 理 你 的 Python环 境 。
2023-09-03 08:01:36.678 | ERROR | middlewares.timeout:handle_request:36 - 发 生 错 误 : 'FreeTypeFont' object has no attribute 'getsize'
2023-09-03 08:01:36.678 | ERROR | universal:handle_message:297 - 'FreeTypeFont' object has no attribute 'getsize'
Traceback (most recent call last):
File "/root/chatgpt-mirai-qq-bot/bot.py", line 58, in
loop.run_until_complete(asyncio.gather(*bots))
│ │ │ │ └ [<Task pending name='Task-3' coro=<start_task() running at /root/chatgpt-mirai-qq-bot/platforms/onebot_
bot.py:356> wait_for=<...
│ │ │ └ <function gather at 0x7f3246f485e0>
│ │ └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/init.py'>
│ └ <function BaseEventLoop.run_until_complete at 0x7f3246f59440>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 637, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x7f3246f593a0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 604, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x7f3246f5b1a0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1909, in _run_once
handle._run()
│ └ <function Handle._run at 0x7f3246ef0040>
└ <Handle Task.task_wakeup()>
File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup()>
File "/root/chatgpt-mirai-qq-bot/platforms/onebot_bot.py", line 183, in _
await handle_message(
└ <function handle_message at 0x7f320dc87240>

File "/root/chatgpt-mirai-qq-bot/universal.py", line 271, in handle_message
await action(session_id, message.strip(), conversation_context, respond)
│ │ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ │ └ None
│ │ │ └ <method 'strip' of 'str' objects>
│ │ └ '在 Windows系 统 下 安 装 pip'
│ └ 'group-666488635'
└ <function handle_message..wrap_request..call at 0x7f320d63c4a0>
File "/root/chatgpt-mirai-qq-bot/universal.py", line 53, in call
await m.handle_request(session_id, message, respond, conversation_context, n)
│ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x7f
320d63c220>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ '在 Windows系 统 下 安 装 pip'
│ │ └ 'group-666488635'
│ └ <function MiddlewareConcurrentLock.handle_request at 0x7f320dcb1760>
└ <middlewares.concurrentlock.MiddlewareConcurrentLock object at 0x7f320dcb8e90>
File "/root/chatgpt-mirai-qq-bot/middlewares/concurrentlock.py", line 43, in handle_request
await action(session_id, prompt, conversation_context, respond)
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ None
│ │ └ '在 Windows系 统 下 安 装 pip'
│ └ 'group-666488635'
└ <function handle_message..wrap_request..call at 0x7f320d63c220>
File "/root/chatgpt-mirai-qq-bot/universal.py", line 53, in call
await m.handle_request(session_id, message, respond, conversation_context, n)
│ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x7f
320d63c220>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ '在 Windows系 统 下 安 装 pip'
│ │ └ 'group-666488635'
│ └ <function MiddlewareConcurrentLock.handle_request at 0x7f320dcb1760>
└ <middlewares.concurrentlock.MiddlewareConcurrentLock object at 0x7f320dcb8e90>
File "/root/chatgpt-mirai-qq-bot/middlewares/concurrentlock.py", line 43, in handle_request
await action(session_id, prompt, conversation_context, respond)
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ None
│ │ └ '在 Windows系 统 下 安 装 pip'
│ └ 'group-666488635'
└ <function handle_message..wrap_request..call at 0x7f320d63c220>
File "/root/chatgpt-mirai-qq-bot/universal.py", line 53, in call
await m.handle_request(session_id, message, respond, conversation_context, n)
│ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x7f
320d63c180>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ '在 Windows系 统 下 安 装 pip'
│ │ └ 'group-666488635'
│ └ <function Middleware.handle_request at 0x7f320dcb0ae0>
└ <middlewares.baiducloud.MiddlewareBaiduCloud object at 0x7f320dcb9210>
File "/root/chatgpt-mirai-qq-bot/middlewares/middleware.py", line 9, in handle_request
await action(session_id, prompt, conversation_context, respond)
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ None
│ │ └ '在 Windows系 统 下 安 装 pip'
│ └ 'group-666488635'
└ <function handle_message..wrap_request..call at 0x7f320d63c180>
File "/root/chatgpt-mirai-qq-bot/middlewares/middleware.py", line 9, in handle_request
await action(session_id, prompt, conversation_context, respond)
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ None
│ │ └ '在 Windows系 统 下 安 装 pip'
│ └ 'group-666488635'
└ <function handle_message..wrap_request..call at 0x7f320d63c180>
File "/root/chatgpt-mirai-qq-bot/universal.py", line 53, in call
await m.handle_request(session_id, message, respond, conversation_context, n)
│ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x7f
320d63c040>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ '在 Windows系 统 下 安 装 pip'
│ │ └ 'group-666488635'
│ └ <function MiddlewareRatelimit.handle_request at 0x7f320dcb0d60>
└ <middlewares.ratelimit.MiddlewareRatelimit object at 0x7f320dcb8e50>
File "/root/chatgpt-mirai-qq-bot/middlewares/ratelimit.py", line 23, in handle_request
await action(session_id, prompt, conversation_context, respond)
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ None
│ │ └ '在 Windows系 统 下 安 装 pip'
│ └ 'group-666488635'
└ <function handle_message..wrap_request..call at 0x7f320d63c040>
File "/root/chatgpt-mirai-qq-bot/universal.py", line 53, in call
await action(session_id, prompt, conversation_context, respond)
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ None
│ │ └ '在 Windows系 统 下 安 装 pip'
│ └ 'group-666488635'
└ <function handle_message..wrap_request..call at 0x7f320d63c040>
File "/root/chatgpt-mirai-qq-bot/universal.py", line 53, in call
await m.handle_request(session_id, message, respond, conversation_context, n)
│ │ │ │ │ │ └ <function handle_message..request at 0x7f320dcb3ec0>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x7f320dcb3e20>
│ │ │ └ '在 Windows系 统 下 安 装 pip'
│ │ └ 'group-666488635'
│ └ <function MiddlewareTimeout.handle_request at 0x7f320dcb18a0>
└ <middlewares.timeout.MiddlewareTimeout object at 0x7f320dcb9190>
File "/root/chatgpt-mirai-qq-bot/middlewares/timeout.py", line 40, in handle_request
raise e
File "/root/chatgpt-mirai-qq-bot/middlewares/timeout.py", line 27, in handle_request
await asyncio.wait_for(coro_task, config.response.max_timeout)
│ │ │ │ │ └ 600.0
│ │ │ │ └ Response(mode='mixed', buffer_delay=15, default_ai='chatgpt-web', error_format='出 现 故 障 ! 如 果 这 个 问 题
持 续 出 现 , 请 和 我 说 “重 置 会 话 ” 来 开 启 一 段 新 的 会 话 , 或 者 发 送 “回 滚 ...
│ │ │ └ Config(onebot=Onebot(manager_qq=3367485820, reverse_ws_host='0.0.0.0', reverse_ws_port=8566), mirai=None, tel
egram=None, disc...
│ │ └ <Task finished name='Task-26' coro=<handle_message..request() done, defined at /root/chatgpt-mirai-qq-bot/univer
sal.p...
│ └ <function wait_for at 0x7f3246f48040>
└ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/init.py'>
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 479, in wait_for
return fut.result()
│ └ <method 'result' of '_asyncio.Task' objects>
└ <Task finished name='Task-26' coro=<handle_message..request() done, defined at /root/chatgpt-mirai-qq-bot/universal.p...
File "/root/chatgpt-mirai-qq-bot/universal.py", line 224, in request
async for rendered in task:
│ └ <async_generator object retry..decorator..wrapper at 0x7f320dc1e180>
└ None
File "/root/chatgpt-mirai-qq-bot/conversation.py", line 202, in ask
yield await self.renderer.result()
│ │ └ <function MixedContentMessageChainRenderer.result at 0x7f320dc86e80>
│ └ <renderer.renderer.MixedContentMessageChainRenderer object at 0x7f3214206510>
└ <conversation.ConversationContext object at 0x7f320e6fad10>
File "/root/chatgpt-mirai-qq-bot/renderer/renderer.py", line 123, in result
return await self.parse(await self.parent.result())
│ │ │ │ └ <function BufferedContentMerger.result at 0x7f320e38aac0>
│ │ │ └ <renderer.merger.BufferedContentMerger object at 0x7f320d635650>
│ │ └ <renderer.renderer.MixedContentMessageChainRenderer object at 0x7f3214206510>
│ └ <function MixedContentMessageChainRenderer.parse at 0x7f320dc86d40>
└ <renderer.renderer.MixedContentMessageChainRenderer object at 0x7f3214206510>
File "/root/chatgpt-mirai-qq-bot/renderer/renderer.py", line 108, in parse
holds.append(await to_image(rich_blocks.strip()))
│ │ │ │ └ <method 'strip' of 'str' objects>
│ │ │ └ '1. **下 载 Python安 装 程 序 **: \n \n'
│ │ └ <function to_image at 0x7f320dc86480>
│ └ <method 'append' of 'list' objects>
└ [Plain(text='在 Windows系 统 下 安 装 pip, 你 可 以 按 照 以 下 步 骤 进 行 操 作 : ')]
File "/root/chatgpt-mirai-qq-bot/utils/text_to_img.py", line 365, in to_image
img = await text_to_image(text=str(text))
│ └ '1. **下 载 Python安 装 程 序 **: '
└ <function text_to_image at 0x7f320dc863e0>
File "/root/chatgpt-mirai-qq-bot/utils/text_to_img.py", line 359, in text_to_image
image = await asyncio.get_event_loop().run_in_executor(None, text_to_image_raw, text)
│ │ │ └ '1. **下
载 Python安 装 程 序 **: '
│ │ └ <function text_to_image_raw at 0x7f320e38b600>
│ └
└ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/init.py'>
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
│ │ └ None
│ └ None
└ None
File "/root/chatgpt-mirai-qq-bot/utils/text_to_img.py", line 228, in text_to_image_raw
text_height = font.getsize(text)[1]
│ └ '1. **下 载 Python安 装 程 序 **: '
└ <PIL.ImageFont.FreeTypeFont object at 0x7f320dc9ded0>
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
2023-09-03 08:01:36.704 | DEBUG | platforms.onebot_bot:respond:112 - [OneBot] 尝 试 发 送 消 息 : 出 现 故 障 ! 如 果 这 个 问 题 持 续 出 现 , 请 和 我 说 “重 置 会 话 ” 来 开
启 一 段 新 的 会 话 , 或 者 发 送 “回 滚 对 话 ” 来 回 溯 到 上 一 条 对 话 , 你 上 一 条 说 的 我 就 当 作 没 看 见 。
原 因 : 'FreeTypeFont' object has no attribute 'getsize'

@jgc9527
Copy link
Author

jgc9527 commented Sep 3, 2023

目前测试结果为
text模式正常,其他两种模式都报错
wkhtmltoimage已安装,但是文档并没有细说后续操作

@lss233
Copy link
Owner

lss233 commented Sep 10, 2023

看样子是字体文件缺了,检查一下assets文件夹里面的字体文件还在不在。

@jgc9527
Copy link
Author

jgc9527 commented Sep 10, 2023

看样子是字体文件缺了,检查一下assets文件夹里面的字体文件还在不在。

Screenshot_20230910_103224_com.server.auditor.ssh.client.png

@lss233
Copy link
Owner

lss233 commented Sep 10, 2023

看下font目录呢?

@jgc9527
Copy link
Author

jgc9527 commented Sep 10, 2023

看下font目录呢?

Screenshot_20230910_105956_com.server.auditor.ssh.client.png

@sanjinbot
Copy link

我也是这样,上一条没啥问题,下一条就显示这个错误

@zsanjin-p
Copy link

zsanjin-p commented Sep 19, 2023

dockers部署的
我也是这样,救命 啊
出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。
原因:'FreeTypeFont' object has no attribute 'getsize'

的消息: 鲲 (-2028098618)
chatgpt-qq-chatgpt-1 | 2023-09-19 14:06:23.823 | DEBUG | adapter.ms.bing:ask:113 - [Bing AI 响应] 鲲是一种传说中的神兽,它的形象是一条巨大的鱼,能够化为龙。鲲的名字来源于《庄子·逍遥游》中的一句话:“北冥有鱼,其名为鲲。鲲之大,不知其几千里也。” 鲲的故事在中国文化中有着深远的影响,比如《山海经》中的鲲鹏、《西游记》中的鲤鱼跳龙门、《封神演义》中的哪吒三太子等。鲲的形象也被用于各种艺术作品中,如诗歌、绘画、雕塑、动漫等。
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | : [庄子·逍遥游]
chatgpt-qq-chatgpt-1 | : [鲲 (神话)]
chatgpt-qq-chatgpt-1 | 猜你想问:
chatgpt-qq-chatgpt-1 | * 鲲的故事有哪些?
chatgpt-qq-chatgpt-1 | * 你能画一幅鲲的图片吗?
chatgpt-qq-chatgpt-1 | * 还有其他神兽吗?
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | 剩余回复数:4 / 30
chatgpt-qq-chatgpt-1 | 2023-09-19 14:06:24.263 | ERROR | utils.text_to_img:text_to_image:350 -
chatgpt-qq-chatgpt-1 | No wkhtmltoimage executable found: ".\wkhtmltoimage.EXE"
chatgpt-qq-chatgpt-1 | If this file exists please check that this process can read it.
chatgpt-qq-chatgpt-1 | Otherwise please install wkhtmltopdf - http://wkhtmltopdf.org/
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | Traceback (most recent call last):
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/site-packages/imgkit/config.py", line 52, in get_wkhtmltoimage
chatgpt-qq-chatgpt-1 | with open(self.wkhtmltoimage):
chatgpt-qq-chatgpt-1 | │ └ '.\wkhtmltoimage.EXE'
chatgpt-qq-chatgpt-1 | └ <imgkit.config.Config object at 0x7f7dbad23fd0>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | FileNotFoundError: [Errno 2] No such file or directory: '.\wkhtmltoimage.EXE'
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | The above exception was the direct cause of the following exception:
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | Traceback (most recent call last):
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/bot.py", line 58, in
chatgpt-qq-chatgpt-1 | loop.run_until_complete(asyncio.gather(bots))
chatgpt-qq-chatgpt-1 | │ │ │ │ └ [<Task pending name='Task-4' coro=<start_task() running at /app/platforms/onebot_bot.py:356> wait_for=<_GatheringFuture pendi...
chatgpt-qq-chatgpt-1 | │ │ │ └ <function gather at 0x7f7e0499a3b0>
chatgpt-qq-chatgpt-1 | │ │ └ <module 'asyncio' from '/usr/local/lib/python3.10/asyncio/init.py'>
chatgpt-qq-chatgpt-1 | │ └ <function BaseEventLoop.run_until_complete at 0x7f7e049baf80>
chatgpt-qq-chatgpt-1 | └ <_UnixSelectorEventLoop running=True closed=False debug=False>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
chatgpt-qq-chatgpt-1 | self.run_forever()
chatgpt-qq-chatgpt-1 | │ └ <function BaseEventLoop.run_forever at 0x7f7e049baef0>
chatgpt-qq-chatgpt-1 | └ <_UnixSelectorEventLoop running=True closed=False debug=False>
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
chatgpt-qq-chatgpt-1 | self._run_once()
chatgpt-qq-chatgpt-1 | │ └ <function BaseEventLoop._run_once at 0x7f7e049bca60>
chatgpt-qq-chatgpt-1 | └ <_UnixSelectorEventLoop running=True closed=False debug=False>
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
chatgpt-qq-chatgpt-1 | handle._run()
chatgpt-qq-chatgpt-1 | │ └ <function Handle._run at 0x7f7e0496c430>
chatgpt-qq-chatgpt-1 | └ <Handle Task.task_wakeup(<Future finis...n\n ')>)>
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
chatgpt-qq-chatgpt-1 | self._context.run(self._callback, self._args)
chatgpt-qq-chatgpt-1 | │ │ │ │ │ └ <member '_args' of 'Handle' objects>
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <Handle Task.task_wakeup(<Future finis...n\n ')>)>
chatgpt-qq-chatgpt-1 | │ │ │ └ <member '_callback' of 'Handle' objects>
chatgpt-qq-chatgpt-1 | │ │ └ <Handle Task.task_wakeup(<Future finis...n\n ')>)>
chatgpt-qq-chatgpt-1 | │ └ <member '_context' of 'Handle' objects>
chatgpt-qq-chatgpt-1 | └ <Handle Task.task_wakeup(<Future finis...n\n ')>)>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/conversation.py", line 204, in ask
chatgpt-qq-chatgpt-1 | yield await self.renderer.result()
chatgpt-qq-chatgpt-1 | │ │ └ <function MixedContentMessageChainRenderer.result at 0x7f7dbbae1360>
chatgpt-qq-chatgpt-1 | │ └ <renderer.renderer.MixedContentMessageChainRenderer object at 0x7f7dbad23b50>
chatgpt-qq-chatgpt-1 | └ <conversation.ConversationContext object at 0x7f7dbbb097e0>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/renderer/renderer.py", line 123, in result
chatgpt-qq-chatgpt-1 | return await self.parse(await self.parent.result())
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <function LengthContentMerger.result at 0x7f7dcc2f1360>
chatgpt-qq-chatgpt-1 | │ │ │ └ <renderer.merger.LengthContentMerger object at 0x7f7dbbb09de0>
chatgpt-qq-chatgpt-1 | │ │ └ <renderer.renderer.MixedContentMessageChainRenderer object at 0x7f7dbad23b50>
chatgpt-qq-chatgpt-1 | │ └ <function MixedContentMessageChainRenderer.parse at 0x7f7dbbae1240>
chatgpt-qq-chatgpt-1 | └ <renderer.renderer.MixedContentMessageChainRenderer object at 0x7f7dbad23b50>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/renderer/renderer.py", line 113, in parse
chatgpt-qq-chatgpt-1 | holds.append(await to_image(rich_blocks))
chatgpt-qq-chatgpt-1 | │ │ │ └ ': [鲲 (神话)]\n猜你想问: \n 鲲的故事有哪些? \n 你能画一幅鲲的图片吗? \n* 还有其他神兽吗? \n\n剩余回复数:4 / 30 \n'
chatgpt-qq-chatgpt-1 | │ │ └ <function to_image at 0x7f7dbbae0670>
chatgpt-qq-chatgpt-1 | │ └ <method 'append' of 'list' objects>
chatgpt-qq-chatgpt-1 | └ [Plain(text='鲲是一种传说中的神兽,它的形象是一条巨大的鱼,能够化为龙。鲲的名字来源于《庄子·逍遥游》中的一句话:“北冥有鱼,其名为鲲。鲲之大,不知其几千里也。” 鲲的故事在中国文化中有着深远的影响,比如《山海经》中的鲲鹏、《西游记》中的...
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/utils/text_to_img.py", line 365, in to_image
chatgpt-qq-chatgpt-1 | img = await text_to_image(text=str(text))
chatgpt-qq-chatgpt-1 | │ └ ': [鲲 (神话)]\n猜你想问: \n* 鲲的故事有哪些? \n* 你能画一幅鲲的图片吗? \n* 还有其他神兽吗? \n\n剩余回复数:4 / 30 \n'
chatgpt-qq-chatgpt-1 | └ <function text_to_image at 0x7f7dbbae05e0>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | > File "/app/utils/text_to_img.py", line 338, in text_to_image
chatgpt-qq-chatgpt-1 | ok = await asyncio.get_event_loop().run_in_executor(None, imgkit.from_file, input_file,
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <_io.StringIO object at 0x7f7dbbb1e440>
chatgpt-qq-chatgpt-1 | │ │ │ └ <function from_file at 0x7f7dcc2f1b40>
chatgpt-qq-chatgpt-1 | │ │ └ <module 'imgkit' from '/usr/local/lib/python3.10/site-packages/imgkit/init.py'>
chatgpt-qq-chatgpt-1 | │ └
chatgpt-qq-chatgpt-1 | └ <module 'asyncio' from '/usr/local/lib/python3.10/asyncio/init.py'>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
chatgpt-qq-chatgpt-1 | result = self.fn(self.args, self.kwargs)
chatgpt-qq-chatgpt-1 | │ │ └ None
chatgpt-qq-chatgpt-1 | │ └ None
chatgpt-qq-chatgpt-1 | └ None
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/site-packages/imgkit/api.py", line 62, in from_file
chatgpt-qq-chatgpt-1 | rtn = IMGKit(
chatgpt-qq-chatgpt-1 | └ <class 'imgkit.imgkit.IMGKit'>
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/site-packages/imgkit/imgkit.py", line 36, in init
chatgpt-qq-chatgpt-1 | self.wkhtmltoimage = self.config.get_wkhtmltoimage()
chatgpt-qq-chatgpt-1 | │ │ │ └ <function Config.get_wkhtmltoimage at 0x7f7dcc2f1990>
chatgpt-qq-chatgpt-1 | │ │ └ <imgkit.config.Config object at 0x7f7dbad23fd0>
chatgpt-qq-chatgpt-1 | │ └ <imgkit.imgkit.IMGKit object at 0x7f7dbad41690>
chatgpt-qq-chatgpt-1 | └ <imgkit.imgkit.IMGKit object at 0x7f7dbad41690>
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/site-packages/imgkit/config.py", line 55, in get_wkhtmltoimage
chatgpt-qq-chatgpt-1 | raise_from(OSError(wkhtmltoimage_error), io_error)
chatgpt-qq-chatgpt-1 | │ └ '\nNo wkhtmltoimage executable found: ".\wkhtmltoimage.EXE"\nIf this file exists please check that this process can read it....
chatgpt-qq-chatgpt-1 | └ <function raise_from at 0x7f7dd44f5ea0>
chatgpt-qq-chatgpt-1 | File "", line 3, in raise_from
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | OSError:
chatgpt-qq-chatgpt-1 | No wkhtmltoimage executable found: ".\wkhtmltoimage.EXE"
chatgpt-qq-chatgpt-1 | If this file exists please check that this process can read it.
chatgpt-qq-chatgpt-1 | Otherwise please install wkhtmltopdf - http://wkhtmltopdf.org
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | 2023-09-19 14:06:24.370 | ERROR | middlewares.timeout:handle_request:36 - 发生错误: 'FreeTypeFont' object has no attribute 'getsize'
chatgpt-qq-gocqhttp-1 | [2023-09-19 22:06:24] [WARNING]: 获取sso sign时出现错误: Post "http://127.0.0.1:8080/sign": dial tcp 127.0.0.1:8080: connect: connection refused server: http://127.0.0.1:8080/
chatgpt-qq-chatgpt-1 | 2023-09-19 14:06:24.372 | ERROR | universal:handle_message:297 - 'FreeTypeFont' object has no attribute 'getsize'
chatgpt-qq-chatgpt-1 | Traceback (most recent call last):
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/bot.py", line 58, in
chatgpt-qq-chatgpt-1 | loop.run_until_complete(asyncio.gather(bots))
chatgpt-qq-chatgpt-1 | │ │ │ │ └ [<Task pending name='Task-4' coro=<start_task() running at /app/platforms/onebot_bot.py:356> wait_for=<_GatheringFuture pendi...
chatgpt-qq-chatgpt-1 | │ │ │ └ <function gather at 0x7f7e0499a3b0>
chatgpt-qq-chatgpt-1 | │ │ └ <module 'asyncio' from '/usr/local/lib/python3.10/asyncio/init.py'>
chatgpt-qq-chatgpt-1 | │ └ <function BaseEventLoop.run_until_complete at 0x7f7e049baf80>
chatgpt-qq-chatgpt-1 | └ <_UnixSelectorEventLoop running=True closed=False debug=False>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
chatgpt-qq-chatgpt-1 | self.run_forever()
chatgpt-qq-chatgpt-1 | │ └ <function BaseEventLoop.run_forever at 0x7f7e049baef0>
chatgpt-qq-chatgpt-1 | └ <_UnixSelectorEventLoop running=True closed=False debug=False>
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
chatgpt-qq-chatgpt-1 | self._run_once()
chatgpt-qq-chatgpt-1 | │ └ <function BaseEventLoop._run_once at 0x7f7e049bca60>
chatgpt-qq-chatgpt-1 | └ <_UnixSelectorEventLoop running=True closed=False debug=False>
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1909, in _run_once
chatgpt-qq-chatgpt-1 | handle._run()
chatgpt-qq-chatgpt-1 | │ └ <function Handle._run at 0x7f7e0496c430>
chatgpt-qq-chatgpt-1 | └ <Handle Task.task_wakeup()>
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
chatgpt-qq-chatgpt-1 | self._context.run(self._callback, self._args)
chatgpt-qq-chatgpt-1 | │ │ │ │ │ └ <member '_args' of 'Handle' objects>
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <Handle Task.task_wakeup()>
chatgpt-qq-chatgpt-1 | │ │ │ └ <member '_callback' of 'Handle' objects>
chatgpt-qq-chatgpt-1 | │ │ └ <Handle Task.task_wakeup()>
chatgpt-qq-chatgpt-1 | │ └ <member '_context' of 'Handle' objects>
chatgpt-qq-chatgpt-1 | └ <Handle Task.task_wakeup()>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/platforms/onebot_bot.py", line 151, in _
chatgpt-qq-chatgpt-1 | await handle_message(
chatgpt-qq-chatgpt-1 | └ <function handle_message at 0x7f7dbbae2710>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | > File "/app/universal.py", line 271, in handle_message
chatgpt-qq-chatgpt-1 | await action(session_id, message.strip(), conversation_context, respond)
chatgpt-qq-chatgpt-1 | │ │ │ │ │ └ <function handle_message..respond at 0x7f7dbbb1d120>
chatgpt-qq-chatgpt-1 | │ │ │ │ └ None
chatgpt-qq-chatgpt-1 | │ │ │ └ <method 'strip' of 'str' objects>
chatgpt-qq-chatgpt-1 | │ │ └ '鲲'
chatgpt-qq-chatgpt-1 | │ └ 'friend-117'
chatgpt-qq-chatgpt-1 | └ <function handle_message..wrap_request..call at 0x7f7dbbb1d6c0>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/universal.py", line 53, in call
chatgpt-qq-chatgpt-1 | await m.handle_request(session_id, message, respond, conversation_context, n)
chatgpt-qq-chatgpt-1 | │ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x7f7dbbb1d480>
chatgpt-qq-chatgpt-1 | │ │ │ │ │ └ None
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <function handle_message..respond at 0x7f7dbbb1d120>
chatgpt-qq-chatgpt-1 | │ │ │ └ '鲲'
chatgpt-qq-chatgpt-1 | │ │ └ 'friend-117'
chatgpt-qq-chatgpt-1 | │ └ <function MiddlewareConcurrentLock.handle_request at 0x7f7dbbae2d40>
chatgpt-qq-chatgpt-1 | └ <middlewares.concurrentlock.MiddlewareConcurrentLock object at 0x7f7dbbac3670>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/middlewares/concurrentlock.py", line 43, in handle_request
chatgpt-qq-chatgpt-1 | await action(session_id, prompt, conversation_context, respond)
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <function handle_message..respond at 0x7f7dbbb1d120>
chatgpt-qq-chatgpt-1 | │ │ │ └ None
chatgpt-qq-chatgpt-1 | │ │ └ '鲲'
chatgpt-qq-chatgpt-1 | │ └ 'friend-117
chatgpt-qq-chatgpt-1 | └ <function handle_message..wrap_request..call at 0x7f7dbbb1d480>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/universal.py", line 53, in call
chatgpt-qq-chatgpt-1 | await m.handle_request(session_id, message, respond, conversation_context, n)
chatgpt-qq-chatgpt-1 | │ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x7f7dbbb1c430>
chatgpt-qq-chatgpt-1 | │ │ │ │ │ └ None
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <function handle_message..respond at 0x7f7dbbb1d120>
chatgpt-qq-chatgpt-1 | │ │ │ └ '鲲'
chatgpt-qq-chatgpt-1 | │ │ └ 'friend-117'
chatgpt-qq-chatgpt-1 | │ └ <function Middleware.handle_request at 0x7f7dbbae1fc0>
chatgpt-qq-chatgpt-1 | └ <middlewares.baiducloud.MiddlewareBaiduCloud object at 0x7f7dbbac2920>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/middlewares/middleware.py", line 9, in handle_request
chatgpt-qq-chatgpt-1 | await action(session_id, prompt, conversation_context, respond)
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <function handle_message..respond at 0x7f7dbbb1d120>
chatgpt-qq-chatgpt-1 | │ │ │ └ None
chatgpt-qq-chatgpt-1 | │ │ └ '鲲'
chatgpt-qq-chatgpt-1 | │ └ 'friend-117'
chatgpt-qq-chatgpt-1 | └ <function handle_message..wrap_request..call at 0x7f7dbbb1c430>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/universal.py", line 53, in call
chatgpt-qq-chatgpt-1 | await m.handle_request(session_id, message, respond, conversation_context, n)
chatgpt-qq-chatgpt-1 | │ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x7f7dbbb1c9d0>
chatgpt-qq-chatgpt-1 | │ │ │ │ │ └ None
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <function handle_message..respond at 0x7f7dbbb1d120>
chatgpt-qq-chatgpt-1 | │ │ │ └ '鲲'
chatgpt-qq-chatgpt-1 | │ │ └ 'friend-117'
chatgpt-qq-chatgpt-1 | │ └ <function MiddlewareRatelimit.handle_request at 0x7f7dbbae2200>
chatgpt-qq-chatgpt-1 | └ <middlewares.ratelimit.MiddlewareRatelimit object at 0x7f7dbbac28f0>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/middlewares/ratelimit.py", line 23, in handle_request
chatgpt-qq-chatgpt-1 | await action(session_id, prompt, conversation_context, respond)
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <function handle_message..respond at 0x7f7dbbb1d120>
chatgpt-qq-chatgpt-1 | │ │ │ └ None
chatgpt-qq-chatgpt-1 | │ │ └ '鲲'
chatgpt-qq-chatgpt-1 | │ └ 'friend-117'
chatgpt-qq-chatgpt-1 | └ <function handle_message..wrap_request..call at 0x7f7dbbb1c9d0>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/universal.py", line 53, in call
chatgpt-qq-chatgpt-1 | await m.handle_request(session_id, message, respond, conversation_context, n)
chatgpt-qq-chatgpt-1 | │ │ │ │ │ │ └ <function handle_message..request at 0x7f7dbbb1ca60>
chatgpt-qq-chatgpt-1 | │ │ │ │ │ └ None
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <function handle_message..respond at 0x7f7dbbb1d120>
chatgpt-qq-chatgpt-1 | │ │ │ └ '鲲'
chatgpt-qq-chatgpt-1 | │ │ └ 'friend-11'
chatgpt-qq-chatgpt-1 | │ └ <function MiddlewareTimeout.handle_request at 0x7f7dbbae30a0>
chatgpt-qq-chatgpt-1 | └ <middlewares.timeout.MiddlewareTimeout object at 0x7f7dbbac28c0>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/middlewares/timeout.py", line 40, in handle_request
chatgpt-qq-chatgpt-1 | raise e
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/middlewares/timeout.py", line 27, in handle_request
chatgpt-qq-chatgpt-1 | await asyncio.wait_for(coro_task, config.response.max_timeout)
chatgpt-qq-chatgpt-1 | │ │ │ │ │ └ 600.0
chatgpt-qq-chatgpt-1 | │ │ │ │ └ Response(mode='mixed', buffer_delay=0.0, default_ai='slack-claude', error_format='出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “...
chatgpt-qq-chatgpt-1 | │ │ │ └ Config(onebot=Onebot(manager_qq=11, reverse_ws_host='0.0.0.0', reverse_ws_port=8234), mirai=None, telegram=None, disc...
chatgpt-qq-chatgpt-1 | │ │ └ <Task finished name='Task-275' coro=<handle_message..request() done, defined at /app/universal.py:107> exception=Attr...
chatgpt-qq-chatgpt-1 | │ └ <function wait_for at 0x7f7e04999ea0>
chatgpt-qq-chatgpt-1 | └ <module 'asyncio' from '/usr/local/lib/python3.10/asyncio/init.py'>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
chatgpt-qq-chatgpt-1 | return fut.result()
chatgpt-qq-chatgpt-1 | │ └ <method 'result' of '_asyncio.Task' objects>
chatgpt-qq-chatgpt-1 | └ <Task finished name='Task-275' coro=<handle_message..request() done, defined at /app/universal.py:107> exception=Attr...
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/universal.py", line 224, in request
chatgpt-qq-chatgpt-1 | async for rendered in task:
chatgpt-qq-chatgpt-1 | │ └ <async_generator object retry..decorator..wrapper at 0x7f7dbbaabbc0>
chatgpt-qq-chatgpt-1 | └ None
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/utils/retry.py", line 21, in wrapper
chatgpt-qq-chatgpt-1 | async for result in func(args, kwargs):
chatgpt-qq-chatgpt-1 | │ │ │ └ {'prompt': '鲲', 'chain': MessageChain([Plain(text='鲲')]), 'name': '000'}
chatgpt-qq-chatgpt-1 | │ │ └ (<conversation.ConversationContext object at 0x7f7dbbb097e0>,)
chatgpt-qq-chatgpt-1 | │ └ <function ConversationContext.ask at 0x7f7dbbae1900>
chatgpt-qq-chatgpt-1 | └ None
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/conversation.py", line 204, in ask
chatgpt-qq-chatgpt-1 | yield await self.renderer.result()
chatgpt-qq-chatgpt-1 | │ │ └ <function MixedContentMessageChainRenderer.result at 0x7f7dbbae1360>
chatgpt-qq-chatgpt-1 | │ └ <renderer.renderer.MixedContentMessageChainRenderer object at 0x7f7dbad23b50>
chatgpt-qq-chatgpt-1 | └ <conversation.ConversationContext object at 0x7f7dbbb097e0>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/renderer/renderer.py", line 123, in result
chatgpt-qq-chatgpt-1 | return await self.parse(await self.parent.result())
chatgpt-qq-chatgpt-1 | │ │ │ │ └ <function LengthContentMerger.result at 0x7f7dcc2f1360>
chatgpt-qq-chatgpt-1 | │ │ │ └ <renderer.merger.LengthContentMerger object at 0x7f7dbbb09de0>
chatgpt-qq-chatgpt-1 | │ │ └ <renderer.renderer.MixedContentMessageChainRenderer object at 0x7f7dbad23b50>
chatgpt-qq-chatgpt-1 | │ └ <function MixedContentMessageChainRenderer.parse at 0x7f7dbbae1240>
chatgpt-qq-chatgpt-1 | └ <renderer.renderer.MixedContentMessageChainRenderer object at 0x7f7dbad23b50>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/renderer/renderer.py", line 113, in parse
chatgpt-qq-chatgpt-1 | holds.append(await to_image(rich_blocks))
chatgpt-qq-chatgpt-1 | │ │ │ └ ': [鲲 (神话)]\n猜你想问: \n 鲲的故事有哪些? \n 你能画一幅鲲的图片吗? \n 还有其他神兽吗? \n\n剩余回复数:4 / 30 \n'
chatgpt-qq-chatgpt-1 | │ │ └ <function to_image at 0x7f7dbbae0670>
chatgpt-qq-chatgpt-1 | │ └ <method 'append' of 'list' objects>
chatgpt-qq-chatgpt-1 | └ [Plain(text='鲲是一种传说中的神兽,它的形象是一条巨大的鱼,能够化为龙。鲲的名字来源于《庄子·逍遥游》中的一句话:“北冥有鱼,其名为鲲。鲲之大,不知其几千里也。” 鲲的故事在中国文化中有着深远的影响,比如《山海经》中的鲲鹏、《西游记》中的...
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/utils/text_to_img.py", line 365, in to_image
chatgpt-qq-chatgpt-1 | img = await text_to_image(text=str(text))
chatgpt-qq-chatgpt-1 | │ └ ': [鲲 (神话)]\n猜你想问: \n 鲲的故事有哪些? \n 你能画一幅鲲的图片吗? \n 还有其他神兽吗? \n\n剩余回复数:4 / 30 \n'
chatgpt-qq-chatgpt-1 | └ <function text_to_image at 0x7f7dbbae05e0>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/utils/text_to_img.py", line 359, in text_to_image
chatgpt-qq-chatgpt-1 | image = await asyncio.get_event_loop().run_in_executor(None, text_to_image_raw, text)
chatgpt-qq-chatgpt-1 | │ │ │ └ ': [鲲 (神话)]\n猜你想问: \n 鲲的故事有哪些? \n 你能画一幅鲲的图片吗? \n* 还有其他神兽吗? \n\n剩余回复数:4 / 30 \n'
chatgpt-qq-chatgpt-1 | │ │ └ <function text_to_image_raw at 0x7f7dbbabff40>
chatgpt-qq-chatgpt-1 | │ └
chatgpt-qq-chatgpt-1 | └ <module 'asyncio' from '/usr/local/lib/python3.10/asyncio/init.py'>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
chatgpt-qq-chatgpt-1 | result = self.fn(self.args, self.kwargs)
chatgpt-qq-chatgpt-1 | │ │ └ None
chatgpt-qq-chatgpt-1 | │ └ None
chatgpt-qq-chatgpt-1 | └ None
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | File "/app/utils/text_to_img.py", line 228, in text_to_image_raw
chatgpt-qq-chatgpt-1 | text_height = font.getsize(text)[1]
chatgpt-qq-chatgpt-1 | │ └ ': [鲲 (神话)]\n猜你想问: \n 鲲的故事有哪些? \n 你能画一幅鲲的图片吗? \n 还有其他神兽吗? \n\n剩余回复数:4 / 30 \n'
chatgpt-qq-chatgpt-1 | └ <PIL.ImageFont.FreeTypeFont object at 0x7f7dbad43730>
chatgpt-qq-chatgpt-1 |
chatgpt-qq-chatgpt-1 | AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
chatgpt-qq-chatgpt-1 | 2023-09-19 14:06:24.392 | DEBUG | platforms.onebot_bot:respond:112 - [OneBot] 尝试发送消息:出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。
chatgpt-qq-chatgpt-1 | 原因:'FreeTypeFont' object has no attribute 'getsize'
chatgpt-qq-gocqhttp-1 | [2023-09-19 22:06:24] [INFO]: 发送好友

@p1aintiff
Copy link

p1aintiff commented Sep 29, 2023

目前测试结果为 text模式正常,其他两种模式都报错 wkhtmltoimage已安装,但是文档并没有细说后续操作

确实,将mod设置为text有几率规避问题

[response]
# 默认的响应模式,支持:
# mixed - 图文混合 (实验性)
# text  - 文字模式
# image - 图片模式
mode = "text"

@p1aintiff
Copy link

目前测试结果为 text模式正常,其他两种模式都报错 wkhtmltoimage已安装,但是文档并没有细说后续操作

确实,将mod设置为text有几率规避问题

[response]
# 默认的响应模式,支持:
# mixed - 图文混合 (实验性)
# text  - 文字模式
# image - 图片模式
mode = "text"

产生原因是:ubuntu切换用户后代理(tz)失效了
解决方法:重新设置梯子

@sanjinbot
Copy link

目前测试结果为 text模式正常,其他两种模式都报错 wkhtmltoimage已安装,但是文档并没有细说后续操作

确实,将mod设置为text有几率规避问题

[response]
# 默认的响应模式,支持:
# mixed - 图文混合 (实验性)
# text  - 文字模式
# image - 图片模式
mode = "text"

产生原因是:ubuntu切换用户后代理(tz)失效了 解决方法:重新设置梯子

已经是国外的服务器了,现在设置成text模式,但是会出现
出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。
原因:Document with ID 60 already exists

@xslingcn
Copy link
Contributor

Pillow库中的ImageFont.getsize已在10.0.0版本中被移除(Pillow#7080)。暂时的workaround可以是指定安装旧版本如pip install pillow==9.5,真正的解决方案需要等作者更新。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants