chatgpt-mirai-qq-bot
chatgpt-mirai-qq-bot copied to clipboard
[BUG] Markdown渲染有问题
提交 issue 前,请先确认:
- [x] 我已看过 FAQ,此问题不在列表中
- [x] 我已看过其他 issue,他们不能解决我的问题
- [x] 我认为这不是 Mirai 或者 OpenAI 的 BUG
表现
描述 BUG 的表现情况
生成图片时无法转换为markdown
运行环境:
- 操作系统:CentOS Linux release 7.9.2009
- Docker: Docker version 23.0.1, build a5ee5b1
- 项目版本:v1.5.8-beta
复现步骤
描述你是如何触发这个 BUG 的
对机器人发送问题“c++怎么获取时间戳”
预期行为
应该生成markdown预览样式
截图
2023-02-27 07:48:07.008 | ERROR | utils.text_to_img:text_to_image:321 - wkhtmltoimage exited with non-zero code 127. error:
/usr/bin/wkhtmltoimage: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 937, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x7f2cbf9b81f0>
└ <Thread(asyncio_0, started 139829152909056)>
File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
│ └ <function Thread.run at 0x7f2cbf9b7ee0>
└ <Thread(asyncio_0, started 139829152909056)>
File "/usr/local/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
│ │ │ │ │ └ {}
│ │ │ │ └ <Thread(asyncio_0, started 139829152909056)>
│ │ │ └ (<weakref at 0x7f2c83005d10; to 'ThreadPoolExecutor' at 0x7f2c82ffa520>, <_queue.SimpleQueue object at 0x7f2c82ff5d10>, None,...
│ │ └ <Thread(asyncio_0, started 139829152909056)>
│ └ <function _worker at 0x7f2c830419d0>
└ <Thread(asyncio_0, started 139829152909056)>
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 83, in _worker
work_item.run()
│ └ <function _WorkItem.run at 0x7f2c83041af0>
└ <concurrent.futures.thread._WorkItem object at 0x7f2c8278c490>
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
│ │ │ │ │ └ {}
│ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f2c8278c490>
│ │ │ └ ('在C++中获取时间戳有多种方法,下面介绍其中两种常见的方法:\n\n方法一:使用time函数\n\n使用time函数可以获取当前系统时间距离1970年1月1日0时0分0秒的秒数,也称为UNIX时间戳。代码如下:\n\n```c++\n#inclu...
│ │ └ <concurrent.futures.thread._WorkItem object at 0x7f2c8278c490>
│ └ <function to_image at 0x7f2c83104820>
└ <concurrent.futures.thread._WorkItem object at 0x7f2c8278c490>
File "/app/utils/text_to_img.py", line 334, in to_image
img = text_to_image(text=text)
│ └ '在C++中获取时间戳有多种方法,下面介绍其中两种常见的方法:\n\n方法一:使用time函数\n\n使用time函数可以获取当前系统时间距离1970年1月1日0时0分0秒的秒数,也称为UNIX时间戳。代码如下:\n\n```c++\n#includ...
└ <function text_to_image at 0x7f2c83104790>
> File "/app/utils/text_to_img.py", line 311, in text_to_image
ok = imgkit.from_file(filename=input_file, config=imgkit_config, options={
│ │ │ └ <imgkit.config.Config object at 0x7f2c826cbe50>
│ │ └ <_io.StringIO object at 0x7f2c826e3b80>
│ └ <function from_file at 0x7f2c830dc820>
└ <module 'imgkit' from '/usr/local/lib/python3.9/site-packages/imgkit/__init__.py'>
File "/usr/local/lib/python3.9/site-packages/imgkit/api.py", line 72, in from_file
return rtn.to_img(output_path)
│ │ └ '/tmp/tmpheyeaiy4.jpg'
│ └ <function IMGKit.to_img at 0x7f2c831041f0>
└ <imgkit.imgkit.IMGKit object at 0x7f2c8278cc70>
File "/usr/local/lib/python3.9/site-packages/imgkit/imgkit.py", line 263, in to_img
raise OSError(
OSError: wkhtmltoimage exited with non-zero code 127. error:
/usr/bin/wkhtmltoimage: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
其他内容
ps: 可以增加一个下载markdown回复的功能吗 就是回复markdown文件
wkhtmltoimage用到了QT Webkit,自己检查看看装环境时有没有缺什么
wkhtmltoimage用到了QT Webkit,自己检查看看装环境时有没有缺什么
我使用的docker-compose应该不会有环境的问题
可以拉一下最新的镜像看看,我换成 headless Chrome 了。
可以拉一下最新的镜像看看,我换成 headless Chrome 了。
依旧存在问题 不过error log 变了
2023-03-02 05:40:19.032 | ERROR | utils.text_to_img:text_to_image:362 - Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x559fee317d93 <unknown>
#1 0x559fee0e62d7 <unknown>
#2 0x559fee10eab0 <unknown>
#3 0x559fee10aa3d <unknown>
#4 0x559fee14f4f4 <unknown>
#5 0x559fee146353 <unknown>
#6 0x559fee115e40 <unknown>
#7 0x559fee117038 <unknown>
#8 0x559fee36b8be <unknown>
#9 0x559fee36f8f0 <unknown>
#10 0x559fee34ff90 <unknown>
#11 0x559fee370b7d <unknown>
#12 0x559fee341578 <unknown>
#13 0x559fee395348 <unknown>
#14 0x559fee3954d6 <unknown>
#15 0x559fee3af341 <unknown>
#16 0x7f1e4630aea7 start_thread
Traceback (most recent call last):
File "/app/bot.py", line 273, in <module>
app.launch_blocking()
│ └ <classmethod object at 0x7fc622ea1910>
└ <graia.ariadne.app.Ariadne object at 0x7fc624bcfd60>
File "/usr/local/lib/python3.9/site-packages/graia/ariadne/app.py", line 312, in launch_blocking
cls.launch_manager.launch_blocking(loop=cls.service.loop, stop_signal=stop_signals)
│ │ │ │ │ │ └ (<Signals.SIGINT: 2>,)
│ │ │ │ │ └ <property object at 0x7fc622eab4f0>
│ │ │ │ └ <graia.ariadne.service.ElizabethService object at 0x7fc624be2c40>
│ │ │ └ <class 'graia.ariadne.app.Ariadne'>
│ │ └ <function Launart.launch_blocking at 0x7fc62402c940>
│ └ <launart.manager.Launart object at 0x7fc5e7f57d00>
└ <class 'graia.ariadne.app.Ariadne'>
File "/usr/local/lib/python3.9/site-packages/launart/manager.py", line 494, in launch_blocking
loop.run_until_complete(launch_task)
│ │ └ <Task pending name='amnesia-launch' coro=<Launart.launch() running at /usr/local/lib/python3.9/site-packages/launart/manager....
│ └ <function BaseEventLoop.run_until_complete at 0x7fc624256ca0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x7fc624256c10>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 601, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x7fc62425a790>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1905, in _run_once
handle._run()
│ └ <function Handle._run at 0x7fc62429c1f0>
└ <Handle <TaskStepMethWrapper object at 0x7fc5e7437d60>()>
File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle <TaskStepMethWrapper object at 0x7fc5e7437d60>()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle <TaskStepMethWrapper object at 0x7fc5e7437d60>()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle <TaskStepMethWrapper object at 0x7fc5e7437d60>()>
File "/usr/local/lib/python3.9/site-packages/graia/broadcast/__init__.py", line 191, in Executor
result = await run_always_await(target_callable, **parameter_compile_result)
│ │ └ {'app': <graia.ariadne.app.Ariadne object at 0x7fc624bcfd60>, 'friend': Friend(id=123456789, nickname='听风', remark='听风'), 'so...
│ └ <function friend_message_listener at 0x7fc5e7f64d30>
└ <function run_always_await at 0x7fc623fdfa60>
File "/usr/local/lib/python3.9/site-packages/graia/broadcast/utilles.py", line 34, in run_always_await
obj = await obj
└ <coroutine object friend_message_listener at 0x7fc5e760cd40>
File "/app/bot.py", line 180, in friend_message_listener
await respond(friend, source, response)
│ │ │ └ '出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。\n("Connection broken: InvalidChunkLength(got lengt...
│ │ └ Source(id=22137, time=datetime.datetime(2023, 3, 2, 5, 39, 11, tzinfo=datetime.timezone.utc), type='Source')
│ └ Friend(id=123456789, nickname='听风', remark='听风')
└ <function respond at 0x7fc5e7f64af0>
File "/app/bot.py", line 61, in respond
await respond_as_image(target, source, response)
│ │ │ └ '出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。\n("Connection broken: InvalidChunkLength(got lengt...
│ │ └ Source(id=22137, time=datetime.datetime(2023, 3, 2, 5, 39, 11, tzinfo=datetime.timezone.utc), type='Source')
│ └ Friend(id=123456789, nickname='听风', remark='听风')
└ <function respond_as_image at 0x7fc5e7f649d0>
File "/app/bot.py", line 51, in respond_as_image
return await app.send_message(target, await to_image(response),
│ │ │ │ └ '出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。\n("Connection broken: InvalidChunkLength(got lengt...
│ │ │ └ <function to_image at 0x7fc5e7fe94c0>
│ │ └ Friend(id=123456789, nickname='听风', remark='听风')
│ └ <function Ariadne.send_message at 0x7fc622eb7af0>
└ <graia.ariadne.app.Ariadne object at 0x7fc624bcfd60>
File "/app/utils/text_to_img.py", line 378, in to_image
img = await text_to_image(text=text)
│ └ '出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。\n("Connection broken: InvalidChunkLength(got lengt...
└ <function text_to_image at 0x7fc5e7fe9430>
> File "/app/utils/text_to_img.py", line 350, in text_to_image
screenshot(temp_html_file.name, config.text_to_image.width, temp_jpg_filename)
│ │ │ │ │ │ └ '/tmp/tmp5ppwz05o.png'
│ │ │ │ │ └ 700
│ │ │ │ └ TextToImage(always=True, font_size=30, width=700, font_path='fonts/sarasa-mono-sc-regular.ttf', offset_x=50, offset_y=50, wkh...
│ │ │ └ Config(mirai=Mirai(qq=123456789, manager_qq=0, api_key='1234567890', http_url='http://localhost:8081', ws_url='http://localho...
│ │ └ '/tmp/tmp193m4u1s.html'
│ └ <tempfile._TemporaryFileWrapper object at 0x7fc5e7437fd0>
└ <function screenshot at 0x7fc5e7fe93a0>
File "/app/utils/text_to_img.py", line 313, in screenshot
driver = webdriver.Chrome(options=chrome_options)
│ │ └ <selenium.webdriver.chrome.options.Options object at 0x7fc5e7437400>
│ └ <class 'selenium.webdriver.chrome.webdriver.WebDriver'>
└ <module 'selenium.webdriver' from '/usr/local/lib/python3.9/site-packages/selenium/webdriver/__init__.py'>
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 80, in __init__
super().__init__(
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 104, in __init__
super().__init__(
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 286, in __init__
self.start_session(capabilities, browser_profile)
│ │ │ └ None
│ │ └ {'browserName': 'chrome', 'pageLoadStrategy': 'normal', 'goog:chromeOptions': {'extensions': [], 'args': ['--headless', '--hi...
│ └ <function WebDriver.start_session at 0x7fc62050a0d0>
└ <selenium.webdriver.chrome.webdriver.WebDriver (session="None")>
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 378, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
│ │ │ │ └ {'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'chrome', 'pageLoadStrategy': 'normal', 'goog:chromeOpti...
│ │ │ └ 'newSession'
│ │ └ <class 'selenium.webdriver.remote.command.Command'>
│ └ <function WebDriver.execute at 0x7fc62050a310>
└ <selenium.webdriver.chrome.webdriver.WebDriver (session="None")>
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute
self.error_handler.check_response(response)
│ │ │ └ {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: Chrome failed to start: exited abnormal...
│ │ └ <function ErrorHandler.check_response at 0x7fc6205aa0d0>
│ └ <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fc5e7437a90>
└ <selenium.webdriver.chrome.webdriver.WebDriver (session="None")>
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response
raise exception_class(message, screen, stacktrace)
│ │ │ └ ['#0 0x559fee317d93 <unknown>', '#1 0x559fee0e62d7 <unknown>', '#2 0x559fee10eab0 <unknown>', '#3 0x559fee10aa3d <unknown>', ...
│ │ └ None
│ └ "unknown error: Chrome failed to start: exited abnormally.\n (unknown error: DevToolsActivePort file doesn't exist)\n (The ...
└ <class 'selenium.common.exceptions.WebDriverException'>
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x559fee317d93 <unknown>
#1 0x559fee0e62d7 <unknown>
#2 0x559fee10eab0 <unknown>
#3 0x559fee10aa3d <unknown>
#4 0x559fee14f4f4 <unknown>
#5 0x559fee146353 <unknown>
#6 0x559fee115e40 <unknown>
#7 0x559fee117038 <unknown>
#8 0x559fee36b8be <unknown>
#9 0x559fee36f8f0 <unknown>
#10 0x559fee34ff90 <unknown>
#11 0x559fee370b7d <unknown>
#12 0x559fee341578 <unknown>
#13 0x559fee395348 <unknown>
#14 0x559fee3954d6 <unknown>
#15 0x559fee3af341 <unknown>
#16 0x7f1e4630aea7 start_thread
已知问题,正在修复
最新的版本还是有markdown渲染的问题 不过报错又变了
empt-chatgpt-1 |
empt-chatgpt-1 | Traceback (most recent call last):
empt-chatgpt-1 |
empt-chatgpt-1 | File "/app/bot.py", line 274, in <module>
empt-chatgpt-1 | app.launch_blocking()
empt-chatgpt-1 | │ └ <classmethod object at 0x7f925e74a880>
empt-chatgpt-1 | └ <graia.ariadne.app.Ariadne object at 0x7f9260479d60>
empt-chatgpt-1 |
empt-chatgpt-1 | File "/usr/local/lib/python3.9/site-packages/graia/ariadne/app.py", line 312, in launch_blocking
empt-chatgpt-1 | cls.launch_manager.launch_blocking(loop=cls.service.loop, stop_signal=stop_signals)
empt-chatgpt-1 | │ │ │ │ │ │ └ (<Signals.SIGINT: 2>,)
empt-chatgpt-1 | │ │ │ │ │ └ <property object at 0x7f925e753900>
empt-chatgpt-1 | │ │ │ │ └ <graia.ariadne.service.ElizabethService object at 0x7f926048bca0>
empt-chatgpt-1 | │ │ │ └ <class 'graia.ariadne.app.Ariadne'>
empt-chatgpt-1 | │ │ └ <function Launart.launch_blocking at 0x7f925f8d1940>
empt-chatgpt-1 | │ └ <launart.manager.Launart object at 0x7f922dc85940>
empt-chatgpt-1 | └ <class 'graia.ariadne.app.Ariadne'>
empt-chatgpt-1 | File "/usr/local/lib/python3.9/site-packages/launart/manager.py", line 494, in launch_blocking
empt-chatgpt-1 | loop.run_until_complete(launch_task)
empt-chatgpt-1 | │ │ └ <Task pending name='amnesia-launch' coro=<Launart.launch() running at /usr/local/lib/python3.9/site-packages/launart/manager....
empt-chatgpt-1 | │ └ <function BaseEventLoop.run_until_complete at 0x7f925fb00ca0>
empt-chatgpt-1 | └ <_UnixSelectorEventLoop running=True closed=False debug=False>
empt-chatgpt-1 | File "/usr/local/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete
empt-chatgpt-1 | self.run_forever()
empt-chatgpt-1 | │ └ <function BaseEventLoop.run_forever at 0x7f925fb00c10>
empt-chatgpt-1 | └ <_UnixSelectorEventLoop running=True closed=False debug=False>
empt-chatgpt-1 | File "/usr/local/lib/python3.9/asyncio/base_events.py", line 601, in run_forever
empt-chatgpt-1 | self._run_once()
empt-chatgpt-1 | │ └ <function BaseEventLoop._run_once at 0x7f925fb03790>
empt-chatgpt-1 | └ <_UnixSelectorEventLoop running=True closed=False debug=False>
empt-chatgpt-1 | File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1905, in _run_once
empt-chatgpt-1 | handle._run()
empt-chatgpt-1 | │ └ <function Handle._run at 0x7f925fb461f0>
empt-chatgpt-1 | └ <Handle <TaskStepMethWrapper object at 0x7f922c9d8f10>()>
empt-chatgpt-1 | File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
empt-chatgpt-1 | self._context.run(self._callback, *self._args)
empt-chatgpt-1 | │ │ │ │ │ └ <member '_args' of 'Handle' objects>
empt-chatgpt-1 | │ │ │ │ └ <Handle <TaskStepMethWrapper object at 0x7f922c9d8f10>()>
empt-chatgpt-1 | │ │ │ └ <member '_callback' of 'Handle' objects>
empt-chatgpt-1 | │ │ └ <Handle <TaskStepMethWrapper object at 0x7f922c9d8f10>()>
empt-chatgpt-1 | │ └ <member '_context' of 'Handle' objects>
empt-chatgpt-1 | └ <Handle <TaskStepMethWrapper object at 0x7f922c9d8f10>()>
empt-chatgpt-1 | File "/usr/local/lib/python3.9/site-packages/graia/broadcast/__init__.py", line 191, in Executor
empt-chatgpt-1 | result = await run_always_await(target_callable, **parameter_compile_result)
empt-chatgpt-1 | │ │ └ {'app': <graia.ariadne.app.Ariadne object at 0x7f9260479d60>, 'friend': Friend(id=123456789, nickname='听风', remark='听风'), 'so...
empt-chatgpt-1 | │ └ <function friend_message_listener at 0x7f922dc8cca0>
empt-chatgpt-1 | └ <function run_always_await at 0x7f925f888a60>
empt-chatgpt-1 | File "/usr/local/lib/python3.9/site-packages/graia/broadcast/utilles.py", line 34, in run_always_await
empt-chatgpt-1 | obj = await obj
empt-chatgpt-1 | └ <coroutine object friend_message_listener at 0x7f922c9d09c0>
empt-chatgpt-1 |
empt-chatgpt-1 | File "/app/bot.py", line 180, in friend_message_listener
empt-chatgpt-1 | await respond(friend, source, response)
empt-chatgpt-1 | │ │ │ └ '在Java中,获取当前时间戳有多种方法。以下是其中两种常用的方法:\n\n1. 使用 System 类的 currentTimeMillis() 方法获取当前时间戳。该方法返回自 1970 年 1 月 1 日 00:00:00 GMT 以来的毫秒数...
empt-chatgpt-1 | │ │ └ Source(id=44031, time=datetime.datetime(2023, 3, 3, 3, 33, 15, tzinfo=datetime.timezone.utc), type='Source')
empt-chatgpt-1 | │ └ Friend(id=123456789, nickname='听风', remark='听风')
empt-chatgpt-1 | └ <function respond at 0x7f922dc8ca60>
empt-chatgpt-1 |
empt-chatgpt-1 | File "/app/bot.py", line 61, in respond
empt-chatgpt-1 | await respond_as_image(target, source, response)
empt-chatgpt-1 | │ │ │ └ '在Java中,获取当前时间戳有多种方法。以下是其中两种常用的方法:\n\n1. 使用 System 类的 currentTimeMillis() 方法获取当前时间戳。该方法返回自 1970 年 1 月 1 日 00:00:00 GMT 以来的毫秒数...
empt-chatgpt-1 | │ │ └ Source(id=44031, time=datetime.datetime(2023, 3, 3, 3, 33, 15, tzinfo=datetime.timezone.utc), type='Source')
empt-chatgpt-1 | │ └ Friend(id=123456789, nickname='听风', remark='听风')
empt-chatgpt-1 | └ <function respond_as_image at 0x7f922dc8c940>
empt-chatgpt-1 |
empt-chatgpt-1 | File "/app/bot.py", line 51, in respond_as_image
empt-chatgpt-1 | return await app.send_message(target, await to_image(response),
empt-chatgpt-1 | │ │ │ │ └ '在Java中,获取当前时间戳有多种方法。以下是其中两种常用的方法:\n\n1. 使用 System 类的 currentTimeMillis() 方法获取当前时间戳。该方法返回自 1970 年 1 月 1 日 00:00:00 GMT 以来的毫秒数...
empt-chatgpt-1 | │ │ │ └ <function to_image at 0x7f922dd0c5e0>
empt-chatgpt-1 | │ │ └ Friend(id=123456789, nickname='听风', remark='听风')
empt-chatgpt-1 | │ └ <function Ariadne.send_message at 0x7f925e761af0>
empt-chatgpt-1 | └ <graia.ariadne.app.Ariadne object at 0x7f9260479d60>
empt-chatgpt-1 |
empt-chatgpt-1 | File "/app/utils/text_to_img.py", line 366, in to_image
empt-chatgpt-1 | img = await text_to_image(text=text)
empt-chatgpt-1 | │ └ '在Java中,获取当前时间戳有多种方法。以下是其中两种常用的方法:\n\n1. 使用 System 类的 currentTimeMillis() 方法获取当前时间戳。该方法返回自 1970 年 1 月 1 日 00:00:00 GMT 以来的毫秒数...
empt-chatgpt-1 | └ <function text_to_image at 0x7f922dd0c550>
empt-chatgpt-1 |
empt-chatgpt-1 | > File "/app/utils/text_to_img.py", line 336, in text_to_image
empt-chatgpt-1 | ok = imgkit.from_file(filename=input_file, config=imgkit_config, options={
empt-chatgpt-1 | │ │ │ └ <imgkit.config.Config object at 0x7f922c9d82b0>
empt-chatgpt-1 | │ │ └ <_io.StringIO object at 0x7f922ca3c790>
empt-chatgpt-1 | │ └ <function from_file at 0x7f925b8f9b80>
empt-chatgpt-1 | └ <module 'imgkit' from '/usr/local/lib/python3.9/site-packages/imgkit/__init__.py'>
empt-chatgpt-1 |
empt-chatgpt-1 | File "/usr/local/lib/python3.9/site-packages/imgkit/api.py", line 72, in from_file
empt-chatgpt-1 | return rtn.to_img(output_path)
empt-chatgpt-1 | │ │ └ '/tmp/tmp5_huxr88.png'
empt-chatgpt-1 | │ └ <function IMGKit.to_img at 0x7f925b91b4c0>
empt-chatgpt-1 | └ <imgkit.imgkit.IMGKit object at 0x7f922c9d8370>
empt-chatgpt-1 | File "/usr/local/lib/python3.9/site-packages/imgkit/imgkit.py", line 263, in to_img
empt-chatgpt-1 | raise OSError(
empt-chatgpt-1 |
empt-chatgpt-1 | OSError: wkhtmltoimage exited with non-zero code 127. error:
empt-chatgpt-1 | /usr/bin/wkhtmltoimage: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
empt-chatgpt-1 |
参考这个 issue: https://github.com/linuxserver/docker-qbittorrent/issues/103 可能是你的系统内核版本过低导致的。 建议重装一个更新版本的内核
现在不会再出现此问题了。