不太清楚是什么原因导致的。

2021-07-03 20:42:58 E/main: Exception in coroutine <unnamed> net.mamoe.mirai.event.ExceptionInEventHandlerException: Exception in EventHandler at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$14$1.invoke(JvmMethodListenersInternal.kt:147) at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$14$2.invokeSuspend(JvmMethodListenersInternal.kt:154) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$14$1.invoke(JvmMethodListenersInternal.kt:140) ... 7 more Caused by: java.lang.IllegalStateException: para error at net.mamoe.mirai.internal.contact.AbstractUser.uploadImage$suspendImpl(AbstractUser.kt:193) at net.mamoe.mirai.internal.contact.AbstractUser$uploadImage$1.invokeSuspend(AbstractUser.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32) at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178) at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166) at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:362) at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:396) at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:388) at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:293) at kotlinx.coroutines.ResumeAwaitOnCompletion.invoke(JobSupport.kt:1408) at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:318) at kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:295) at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:853) at kotlinx.coroutines.JobSupport.makeCompleting$kotlinx_coroutines_core(JobSupport.kt:803) at kotlinx.coroutines.CompletableDeferredImpl.complete(CompletableDeferred.kt:92) at net.mamoe.mirai.internal.network.handler.QQAndroidBotNetworkHandler$PacketListener.complete(QQAndroidBotNetworkHandler.kt) at net.mamoe.mirai.internal.network.handler.QQAndroidBotNetworkHandler.handlePacket(QQAndroidBotNetworkHandler.kt:635) at net.mamoe.mirai.internal.network.handler.QQAndroidBotNetworkHandler$generifiedParsePacket$2.invokeSuspend(QQAndroidBotNetworkHandler.kt:603) at net.mamoe.mirai.internal.network.handler.QQAndroidBotNetworkHandler$generifiedParsePacket$2.invoke(QQAndroidBotNetworkHandler.kt) at net.mamoe.mirai.internal.network.protocol.packet.KnownPacketFactories.handleIncomingPacket$mirai_core(PacketFactory.kt:284) at net.mamoe.mirai.internal.network.protocol.packet.KnownPacketFactories.parseIncomingPacket(PacketFactory.kt:246) at net.mamoe.mirai.internal.network.handler.QQAndroidBotNetworkHandler.generifiedParsePacket(QQAndroidBotNetworkHandler.kt:594) at net.mamoe.mirai.internal.network.handler.QQAndroidBotNetworkHandler.parsePacket(QQAndroidBotNetworkHandler.kt:589) at net.mamoe.mirai.internal.network.handler.QQAndroidBotNetworkHandler$parsePacketAsync$1.invokeSuspend(QQAndroidBotNetworkHandler.kt:571) ... 6 more >

上传图片的部分代码:

ExternalResource.Companion.uploadAsImage(externalResource, event.getSubject());

我尝试使用sendAsImage方法时会抛出相同错误,不知道原因如何,求教。