发送图片出错 #165
发送图片出错
#165
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
涉及的编程语言
Java
涉及的组件库
mirai (QQ)
疑问描述
图片链接如下:https://p3-pc-sign.douyinpic.com/tos-cn-i-0813/db663bed0efd4453a0ea71cd75e0a307~tplv-dy-aweme-images:q75.webp?x-expires=1695085200&x-signature=xeQnuFM6WsjuwD6HHdXfEXgrl1w%3D&from=3213915784&s=PackSourceEnum_AWEME_DETAIL&se=false&sc=image&biz_tag=aweme_images&l=202308200921264F9269F0E8CB3A10D1AE
代码如下: String url = "https://p3-pc-sign.douyinpic.com/tos-cn-i-0813/db663bed0efd4453a0ea71cd75e0a307~tplv-dy-aweme-images:q75.webp?x-expires=1695085200&x-signature=xeQnuFM6WsjuwD6HHdXfEXgrl1w%3D&from=3213915784&s=PackSourceEnum_AWEME_DETAIL&se=false&sc=image&biz_tag=aweme_images&l=202308200921264F9269F0E8CB3A10D1AE";
event.sendBlocking(MiraiSendOnlyImage.of(Resource.of(new URL(url))));
报错信息如下:
love.forte.simbot.event.EventListenerProcessingException: java.lang.IllegalArgumentException: Unsupported image type (mirai) for ExternalResource net.mamoe.mirai.internal.utils.ExternalResourceImplByFile@4aa9a9b8, considering use gif/png/bmp/jpg format. image header: 52 49 46 46 60 13 03 00 57 45 42 50 56 50 38 20 54 13 03 00 70 60 0E 9D 01 2A 86 04 08 06
at love.forte.simbot.core.event.ListenerInvoker.invoke(SimpleEventListenerManagerImpl.kt:464) ~[simbot-core-3.1.0.jar:na]
at love.forte.simbot.core.event.SimpleEventListenerManagerImpl$doInvoke$2$1$1.invokeSuspend(SimpleEventListenerManagerImpl.kt:312) ~[simbot-core-3.1.0.jar:na]
at love.forte.simbot.core.event.SimpleEventListenerManagerImpl$doInvoke$2$1$1.invoke(SimpleEventListenerManagerImpl.kt) ~[simbot-core-3.1.0.jar:na]
at love.forte.simbot.core.event.SimpleEventListenerManagerImpl$doInvoke$2$1$1.invoke(SimpleEventListenerManagerImpl.kt) ~[simbot-core-3.1.0.jar:na]
at love.forte.simbot.core.event.EventProcessingDirectInterceptEntrance.doIntercept(EventInterceptEntrance.kt:116) ~[simbot-core-3.1.0.jar:na]
at love.forte.simbot.core.event.SimpleEventListenerManagerImpl$doInvoke$2.invokeSuspend(SimpleEventListenerManagerImpl.kt:306) ~[simbot-core-3.1.0.jar:na]
at love.forte.simbot.core.event.SimpleEventListenerManagerImpl$doInvoke$2.invoke(SimpleEventListenerManagerImpl.kt) ~[simbot-core-3.1.0.jar:na]
at love.forte.simbot.core.event.SimpleEventListenerManagerImpl$doInvoke$2.invoke(SimpleEventListenerManagerImpl.kt) ~[simbot-core-3.1.0.jar:na]
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at love.forte.simbot.core.event.SimpleEventListenerManagerImpl.doInvoke(SimpleEventListenerManagerImpl.kt:304) ~[simbot-core-3.1.0.jar:na]
at love.forte.simbot.core.event.SimpleEventListenerManagerImpl.push(SimpleEventListenerManagerImpl.kt:291) ~[simbot-core-3.1.0.jar:na]
at love.forte.simbot.component.mirai.internal.MiraiBotImplKt$registerEvents$1$invokeSuspend$$inlined$doHandler$3.invokeSuspend(MiraiBotImpl.kt:624) ~[simbot-component-mirai-core-3.2.0.0.jar:na]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.8.22.jar:1.8.22-release-407(1.8.22)]
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: java.lang.IllegalArgumentException: Unsupported image type (mirai) for ExternalResource net.mamoe.mirai.internal.utils.ExternalResourceImplByFile@4aa9a9b8, considering use gif/png/bmp/jpg format. image header: 52 49 46 46 60 13 03 00 57 45 42 50 56 50 38 20 54 13 03 00 70 60 0E 9D 01 2A 86 04 08 06
at net.mamoe.mirai.internal.message.image.ImageDecoderKt.calculateImageInfo(ImageDecoder.kt:159) ~[mirai-core-jvm-2.15.0.jar:2.15.0]
at net.mamoe.mirai.internal.contact.CommonGroupImpl$uploadImage$lambda$16$$inlined$runBIO$1.invoke(CoroutineUtils.kt:23) ~[mirai-core-jvm-2.15.0.jar:2.15.0]
at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:51) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:43) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.8.22.jar:1.8.22-release-407(1.8.22)]
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) ~[kotlinx-coroutines-core-jvm-1.6.4.jar:na]
Beta Was this translation helpful? Give feedback.
All reactions