Travellerrr / AronaBot

机器人阿洛娜的额外功能插件
GNU Affero General Public License v3.0
9 stars 1 forks source link

使用语音合成报错 #3

Closed zhukongqwq closed 4 months ago

zhukongqwq commented 4 months ago
2024-05-02 22:22:14 E/Bot.1708712488: java.lang.IllegalStateException: Exception while broadcasting event 'GroupMessageEvent'
java.lang.IllegalStateException: Exception while broadcasting event 'GroupMessageEvent'
    at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast$suspendImpl(EventDispatcher.kt:104)
    at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$1.invokeSuspend(EventDispatcher.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:233)
    at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.lang.IllegalStateException: 未找到异常处理器. 请继承 SimpleListenerHost 中的 handleException 方法, 或在构造 SimpleListenerHost 时提供 CoroutineExceptionHandler
------------
Cannot find exception handler from coroutineContext. 
Please extend SimpleListenerHost.handleException or provide a CoroutineExceptionHandler to the constructor of SimpleListenerHost
    at net.mamoe.mirai.event.SimpleListenerHost.handleException(JvmMethodListeners.kt:192)
    at net.mamoe.mirai.event.SimpleListenerHost$special$$inlined$CoroutineExceptionHandler$1.handleException(CoroutineExceptionHandler.kt:111)
    at net.mamoe.mirai.internal.event.SafeListener.onEvent(SafeListener.kt:75)
    at net.mamoe.mirai.internal.event.SafeListener$onEvent$1.invokeSuspend(SafeListener.kt)
    ... 9 more
Caused by: net.mamoe.mirai.event.ExceptionInEventHandlerException: Exception in EventHandler
    at net.mamoe.mirai.internal.event.JvmMethodListenersInternal.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:155)
    at net.mamoe.mirai.internal.event.JvmMethodListenersInternal.access$registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:26)
    at net.mamoe.mirai.internal.event.JvmMethodListenersInternal$registerEventHandler$callMethod$2.invokeSuspend(JvmMethodListenersInternal.kt:162)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    ... 4 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at net.mamoe.mirai.internal.event.JvmMethodListenersInternal.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:148)
    ... 10 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: ./temp/1714659734309.wav (No such file or directory)
    at AronaBot-1.0.2.mirai2.jar//cn.travellerr.websocket.VoiceGet.make(VoiceGet.java:81)
    at AronaBot-1.0.2.mirai2.jar//cn.travellerr.event.MessageEventListener.onMessage(MessageEventListener.java:76)
    ... 15 more
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: ./temp/1714659734309.wav (No such file or directory)
    at AronaBot-1.0.2.mirai2.jar//cn.travellerr.websocket.downloadVoice.downloadFromUrl(downloadVoice.java:29)
    at AronaBot-1.0.2.mirai2.jar//cn.travellerr.websocket.VoiceWebSocketClient.webSocket(VoiceWebSocketClient.java:79)
    at AronaBot-1.0.2.mirai2.jar//cn.travellerr.websocket.VoiceGet.make(VoiceGet.java:56)
    ... 16 more
Caused by: java.io.FileNotFoundException: ./temp/1714659734309.wav (No such file or directory)
    at java.base/java.io.FileOutputStream.open0(Native Method)
    at java.base/java.io.FileOutputStream.open(Unknown Source)
    at java.base/java.io.FileOutputStream.<init>(Unknown Source)
    at java.base/java.io.FileOutputStream.<init>(Unknown Source)
    at AronaBot-1.0.2.mirai2.jar//cn.travellerr.websocket.downloadVoice.downloadFromUrl(downloadVoice.java:18)
    ... 18 more
Natane0808 commented 4 months ago

在mcl根目录里面创建一个temp文件夹就好了

Travellerrr commented 4 months ago

貌似是插件里面忘记写创建temp文件夹方法了,最新版已修正