MiraiForum

    • 注册
    • 登录
    • 搜索
    • 热门
    • 最新
    • 未解决
    • 标签
    • 群组
    • 友情链接
    1. 主页
    2. mantou
    M
    • 资料
    • 关注 1
    • 粉丝 0
    • 主题 0
    • 帖子 9
    • 最佳 1
    • 有争议的 0
    • 群组 1

    mantou

    @mantou

    摸鱼

    我的博客:https://mt526.github.io
    QQ:2098581065
    如果我没有回帖那就是验证码卡住了,请查看您的聊天

    2
    声望
    13
    资料浏览
    9
    帖子
    0
    粉丝
    1
    关注
    注册时间 最后登录

    mantou 取消关注 关注
    摸鱼

    mantou 发布的最佳帖子

    • RE: 一款简单网页截图插件

      发送截图命令瞬间报错,这是怎么回事?
      mirai-core版本2.13.2,seleium前置也是最新的
      浏览器设置的edge
      日志如下

      2023-01-31 14:51:05 V/Bot.1705609074: [没名字的群就是好群(1061257810)]  (2098581065) -> /截图 baidu.com
      2023-01-31 14:51:05 I/stdout: RobotConfig.enableRobot = true
      2023-01-31 14:51:05 I/stdout: 14:51:05.095 [DefaultDispatcher-worker-9] DEBUG org.ktorm.database - SQL: INSERT INTO wordcloud (sender_id, group_id, content, "time") VALUES (?, ?, ?, ?) 
      2023-01-31 14:51:05 I/stdout: 14:51:05.097 [DefaultDispatcher-worker-9] DEBUG org.ktorm.database - Parameters: [2098581065(bigint), 1061257810(bigint), /��ͼ baidu.com(text), 2023-01-31(date)]
      2023-01-31 14:51:05 I/stdout: 14:51:05.115 [DefaultDispatcher-worker-9] DEBUG org.ktorm.database - Effects: 1
      2023-01-31 14:51:05 V/Bot.1705609074: Group(1061257810) <- 正在截图。。。请稍等
      2023-01-31 14:51:05 W/stderr: Exception in thread "Thread-11527" java.lang.LinkageError: loader constraint violation: when resolving method "xyz.cssxsh.selenium.SeleniumToolKt.RemoteWebDriver(Lxyz/cssxsh/selenium/RemoteWebDriverConfig;)Lorg/openqa/selenium/remote/RemoteWebDriver;" the class loader 'imagepluginv0.0.3.jar' @7fedb795 (instance of net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoaderN, child of 'global-shared' @52b3bf03 net.mamoe.mirai.console.internal.plugin.DynLibClassLoader) of the current class, xyz/cssxsh/mirai/plugin/MiraiSeleniumPlugin, and the class loader 'mirai-selenium-plugin-2.2.5.mirai2.jar' @19fd43da (instance of net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoaderN, child of 'global-shared' @52b3bf03 net.mamoe.mirai.console.internal.plugin.DynLibClassLoader) for the method's defining class, xyz/cssxsh/selenium/SeleniumToolKt, have different Class objects for the type xyz/cssxsh/selenium/RemoteWebDriverConfig used in the signature
      2023-01-31 14:51:05 W/stderr: 	at imagepluginv0.0.3.jar//xyz.cssxsh.mirai.plugin.MiraiSeleniumPlugin.driver(MiraiSeleniumPlugin.kt:57)
      2023-01-31 14:51:05 W/stderr: 	at imagepluginv0.0.3.jar//org.Command.PhantomTools.lambda$onCommand$0(PhantomTools.java:37)
      2023-01-31 14:51:05 W/stderr: 	at java.base/java.lang.Thread.run(Thread.java:834)
      
      
      发布在 插件发布
      M
      mantou

    mantou 发布的最新帖子

    • RE: 一款简单网页截图插件

      发送截图命令瞬间报错,这是怎么回事?
      mirai-core版本2.13.2,seleium前置也是最新的
      浏览器设置的edge
      日志如下

      2023-01-31 14:51:05 V/Bot.1705609074: [没名字的群就是好群(1061257810)]  (2098581065) -> /截图 baidu.com
      2023-01-31 14:51:05 I/stdout: RobotConfig.enableRobot = true
      2023-01-31 14:51:05 I/stdout: 14:51:05.095 [DefaultDispatcher-worker-9] DEBUG org.ktorm.database - SQL: INSERT INTO wordcloud (sender_id, group_id, content, "time") VALUES (?, ?, ?, ?) 
      2023-01-31 14:51:05 I/stdout: 14:51:05.097 [DefaultDispatcher-worker-9] DEBUG org.ktorm.database - Parameters: [2098581065(bigint), 1061257810(bigint), /��ͼ baidu.com(text), 2023-01-31(date)]
      2023-01-31 14:51:05 I/stdout: 14:51:05.115 [DefaultDispatcher-worker-9] DEBUG org.ktorm.database - Effects: 1
      2023-01-31 14:51:05 V/Bot.1705609074: Group(1061257810) <- 正在截图。。。请稍等
      2023-01-31 14:51:05 W/stderr: Exception in thread "Thread-11527" java.lang.LinkageError: loader constraint violation: when resolving method "xyz.cssxsh.selenium.SeleniumToolKt.RemoteWebDriver(Lxyz/cssxsh/selenium/RemoteWebDriverConfig;)Lorg/openqa/selenium/remote/RemoteWebDriver;" the class loader 'imagepluginv0.0.3.jar' @7fedb795 (instance of net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoaderN, child of 'global-shared' @52b3bf03 net.mamoe.mirai.console.internal.plugin.DynLibClassLoader) of the current class, xyz/cssxsh/mirai/plugin/MiraiSeleniumPlugin, and the class loader 'mirai-selenium-plugin-2.2.5.mirai2.jar' @19fd43da (instance of net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoaderN, child of 'global-shared' @52b3bf03 net.mamoe.mirai.console.internal.plugin.DynLibClassLoader) for the method's defining class, xyz/cssxsh/selenium/SeleniumToolKt, have different Class objects for the type xyz/cssxsh/selenium/RemoteWebDriverConfig used in the signature
      2023-01-31 14:51:05 W/stderr: 	at imagepluginv0.0.3.jar//xyz.cssxsh.mirai.plugin.MiraiSeleniumPlugin.driver(MiraiSeleniumPlugin.kt:57)
      2023-01-31 14:51:05 W/stderr: 	at imagepluginv0.0.3.jar//org.Command.PhantomTools.lambda$onCommand$0(PhantomTools.java:37)
      2023-01-31 14:51:05 W/stderr: 	at java.base/java.lang.Thread.run(Thread.java:834)
      
      
      发布在 插件发布
      M
      mantou
    • RE: 宝剑系统(牛子系统和谐改版)

      请问在pipenv install -r requirements.txt这一步报错要怎么解决?网上搜了半天一点有关的都没搜到
      报错信息如下:

      C:\swordbot-main>pipenv install -r requirements.txt
      Traceback (most recent call last):
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1053, in main
          rv = self.invoke(ctx)
               ^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1659, in invoke
          return _process_result(sub_ctx.command.invoke(sub_ctx))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1395, in invoke
          return ctx.invoke(self.callback, **ctx.params)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 754, in invoke
          return __callback(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\decorators.py", line 84, in new_func
          return ctx.invoke(f, obj, *args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 754, in invoke
          return __callback(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\cli\command.py", line 239, in install
          do_install(
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\core.py", line 2144, in do_install
          ensure_project(
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\core.py", line 584, in ensure_project
          ensure_pipfile(
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\core.py", line 236, in ensure_pipfile
          raise exceptions.PipenvOptionsError(
      pipenv.exceptions.PipenvOptionsError: ERROR:: --system is intended to be used fo
      r pre-existing Pipfile installation, not installation of specific packages. Abor
      ting.
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<frozen runpy>", line 198, in _run_module_as_main
        File "<frozen runpy>", line 88, in _run_code
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Scripts\p
      ipenv.exe\__main__.py", line 7, in <module>
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1128, in __call__
          return self.main(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\cli\options.py", line 57, in main
          return super().main(*args, **kwargs, windows_expand_args=False)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1070, in main
          e.show()
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\exceptions.py", line 172, in show
          click.echo(self.ctx.get_usage() + "\n%s" % hint, file=file, color=color)
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\utils.py", line 298, in echo
          file.write(out)  # type: ignore
          ^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\vistir\misc.py", line 994, in write
          return io.TextIOWrapper.write(self, to_text(x, errors=self._errors))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      io.UnsupportedOperation: not writable
      
      C:\swordbot-main>pipenv install -r requirements.txt
      Traceback (most recent call last):
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1053, in main
          rv = self.invoke(ctx)
               ^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1659, in invoke
          return _process_result(sub_ctx.command.invoke(sub_ctx))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1395, in invoke
          return ctx.invoke(self.callback, **ctx.params)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 754, in invoke
          return __callback(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\decorators.py", line 84, in new_func
          return ctx.invoke(f, obj, *args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 754, in invoke
          return __callback(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\cli\command.py", line 239, in install
          do_install(
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\core.py", line 2144, in do_install
          ensure_project(
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\core.py", line 584, in ensure_project
          ensure_pipfile(
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\core.py", line 236, in ensure_pipfile
          raise exceptions.PipenvOptionsError(
      pipenv.exceptions.PipenvOptionsError: ERROR:: --system is intended to be used fo
      r pre-existing Pipfile installation, not installation of specific packages. Abor
      ting.
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<frozen runpy>", line 198, in _run_module_as_main
        File "<frozen runpy>", line 88, in _run_code
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Scripts\p
      ipenv.exe\__main__.py", line 7, in <module>
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1128, in __call__
          return self.main(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\cli\options.py", line 57, in main
          return super().main(*args, **kwargs, windows_expand_args=False)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1070, in main
          e.show()
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\exceptions.py", line 172, in show
          click.echo(self.ctx.get_usage() + "\n%s" % hint, file=file, color=color)
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\utils.py", line 298, in echo
          file.write(out)  # type: ignore
          ^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\vistir\misc.py", line 994, in write
          return io.TextIOWrapper.write(self, to_text(x, errors=self._errors))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      io.UnsupportedOperation: not writable
      
      C:\swordbot-main>pipenv install -r requirements.txt
      Traceback (most recent call last):
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1053, in main
          rv = self.invoke(ctx)
               ^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1659, in invoke
          return _process_result(sub_ctx.command.invoke(sub_ctx))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1395, in invoke
          return ctx.invoke(self.callback, **ctx.params)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 754, in invoke
          return __callback(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\decorators.py", line 84, in new_func
          return ctx.invoke(f, obj, *args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 754, in invoke
          return __callback(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\cli\command.py", line 239, in install
          do_install(
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\core.py", line 2144, in do_install
          ensure_project(
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\core.py", line 584, in ensure_project
          ensure_pipfile(
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\core.py", line 236, in ensure_pipfile
          raise exceptions.PipenvOptionsError(
      pipenv.exceptions.PipenvOptionsError: ERROR:: --system is intended to be used fo
      r pre-existing Pipfile installation, not installation of specific packages. Abor
      ting.
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<frozen runpy>", line 198, in _run_module_as_main
        File "<frozen runpy>", line 88, in _run_code
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Scripts\p
      ipenv.exe\__main__.py", line 7, in <module>
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1128, in __call__
          return self.main(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\cli\options.py", line 57, in main
          return super().main(*args, **kwargs, windows_expand_args=False)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\core.py", line 1070, in main
          e.show()
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\exceptions.py", line 172, in show
          click.echo(self.ctx.get_usage() + "\n%s" % hint, file=file, color=color)
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\click\utils.py", line 298, in echo
          file.write(out)  # type: ignore
          ^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-
      packages\pipenv\vendor\vistir\misc.py", line 994, in write
          return io.TextIOWrapper.write(self, to_text(x, errors=self._errors))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      io.UnsupportedOperation: not writable
      

      Python版本是3.11
      麻烦大佬看一下

      发布在 其他项目发布
      M
      mantou
    • RE: 自定义调用API插件

      我这好像是个空文件,大小0B

      发布在 插件发布
      M
      mantou
    • RE: 自定义调用API插件

      @Kloping Windows sever 2012 r2

      发布在 插件发布
      M
      mantou
    • RE: 自定义调用API插件

      @Kloping 我就是用的这个版本的

      发布在 插件发布
      M
      mantou
    • RE: 自定义调用API插件

      @Kloping 可是那个未来天气的api应该是可以用的啊,在浏览器里打开是会返回天气信息的,但控制台报错好像和这个也一样
      这是“未来天气”的报错

      
      2023-01-02 15:31:42 V/Bot.1705609074: [没名字的群就是好群(1061257810)]  (2098581065) -> 未来天气 北京
      2023-01-02 15:31:42 E/Bot.1705609074: 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 MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.CallApiPlugin$1.handleException(CallApiPlugin.java:46)
      	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.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:147)
      	at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.access$registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:1)
      	at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$callMethod$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.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
      	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
      	... 4 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at jdk.internal.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      	at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:140)
      	... 10 more
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.github.kloping.clasz.ClassUtils
      	at lib-tts.jar//io.github.kloping.serialize.HMLObject.getFields(HMLObject.java:276)
      	at lib-tts.jar//io.github.kloping.serialize.HMLObject.work(HMLObject.java:81)
      	at lib-tts.jar//io.github.kloping.serialize.HMLObject.toHMLString(HMLObject.java:75)
      	at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.ManagerConf.apply(ManagerConf.java:64)
      	at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.ManagerConf.getStateByTouchAndIdDefault(ManagerConf.java:45)
      	at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.Worker.enable(Worker.java:113)
      	at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.Worker.call(Worker.java:95)
      	at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.CallApiPlugin$1.onMessage0(CallApiPlugin.java:74)
      	at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.CallApiPlugin$1.onMessage(CallApiPlugin.java:51)
      	... 14 more
      
      2023-01-02 15:32:06 V/Bot.1705609074: [没名字的群就是好群(1061257810)]  (2098581065) -> 未来天气 北京
      2023-01-02 15:32:07 V/Bot.1705609074: Group(1061257810) <- 未来天气查询失败
      
      

      实在是想不明白
      再次麻烦大佬了!如果需要其他信息尽管说,我可以提供

      发布在 插件发布
      M
      mantou
    • RE: 自定义调用API插件

      大佬,我用这个插件发第一遍会报错,和上面那位有点像?我也已经把lib-tts.jar放到plugins里了
      发第二遍信息时不会在控制台报错但机器人会秒回“未来天气查询失败”这样的信息,我不知道是不是我的问题或是api的问题,api用的就是您在文末写的那些。麻烦大佬能帮我看下是哪出问题了吗?
      这是报错的日志文件

      2022-12-31 16:54:08 V/Bot.1705609074: [没名字的群就是好群(1061257810)]  (209858
      1065) -> 星座运势
      2022-12-31 16:54:08 E/Bot.1705609074: java.lang.IllegalStateException: Exception
       while broadcasting event 'GroupMessageEvent'
      java.lang.IllegalStateException: Exception while broadcasting event 'GroupMessag
      eEvent'
              at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broad
      cast$suspendImpl(EventDispatcher.kt:104)
              at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broad
      cast$1.invokeSuspend(EventDispatcher.kt)
              at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Contin
      uationImpl.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(Contin
      uationImpl.kt:46)
              at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
              at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineS
      cheduler.kt:570)
              at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(C
      oroutineScheduler.kt:750)
              at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(Cor
      outineScheduler.kt:677)
              at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Coroutine
      Scheduler.kt:664)
      Caused by: java.lang.IllegalStateException: 未找到异常处理器. 请继承 SimpleListe
      nerHost 中的 handleException 方法, 或在构造 SimpleListenerHost 时提供 CoroutineE
      xceptionHandler
      ------------
      Cannot find exception handler from coroutineContext.
      Please extend SimpleListenerHost.handleException or provide a CoroutineException
      Handler to the constructor of SimpleListenerHost
              at net.mamoe.mirai.event.SimpleListenerHost.handleException(JvmMethodLis
      teners.kt:192)
              at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.CallApiPlu
      gin$1.handleException(CallApiPlugin.java:46)
              at net.mamoe.mirai.event.SimpleListenerHost$special$$inlined$CoroutineEx
      ceptionHandler$1.handleException(CoroutineExceptionHandler.kt:111)
              at net.mamoe.mirai.internal.event.SafeListener.onEvent(SafeListener.kt:7
      5)
              at net.mamoe.mirai.internal.event.SafeListener$onEvent$1.invokeSuspend(S
      afeListener.kt)
              ... 9 more
      Caused by: net.mamoe.mirai.event.ExceptionInEventHandlerException: Exception in
      EventHandler
              at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerE
      ventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:147)
              at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.access$re
      gisterEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.k
      t:1)
              at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerE
      ventHandler$callMethod$2.invokeSuspend(JvmMethodListenersInternal.kt:154)
              at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Contin
      uationImpl.kt:33)
              at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
              at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.k
      t:42)
              at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
              ... 4 more
      Caused by: java.lang.reflect.InvocationTargetException
              at jdk.internal.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(De
      legatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerE
      ventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:140)
              ... 10 more
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.github.
      kloping.clasz.ClassUtils
              at lib-tts.jar//io.github.kloping.serialize.HMLObject.getFields(HMLObjec
      t.java:276)
              at lib-tts.jar//io.github.kloping.serialize.HMLObject.work(HMLObject.jav
      a:81)
              at lib-tts.jar//io.github.kloping.serialize.HMLObject.toHMLString(HMLObj
      ect.java:75)
              at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.ManagerCon
      f.apply(ManagerConf.java:64)
              at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.ManagerCon
      f.getStateByTouchAndIdDefault(ManagerConf.java:52)
              at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.Worker.ena
      ble(Worker.java:113)
              at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.Worker.cal
      l(Worker.java:95)
              at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.CallApiPlu
      gin$1.onMessage0(CallApiPlugin.java:74)
              at MiraiCallApiPlugin-v2.8.1.jar//io.github.gdpl2112.mirai.p1.CallApiPlu
      gin$1.onMessage(CallApiPlugin.java:51)
              ... 14 more
      
      2022-12-31 16:54:13 V/Bot.1705609074: [没名字的群就是好群(1061257810)]  (209858
      1065) -> 星座运势
      2022-12-31 16:54:14 V/Bot.1705609074: Group(1061257810) <- 星座运势调用失败
      

      这是我的配置文件

      {
      	"passwd":"123456",
      	"permType":"all",
      	"port":20042,
      	"proxyIp":null,
      	"proxyPort":null,
      	"splitChar":" ",
      	"templates":[
      		{
      			"out": "<Pic:$1>",
      			"outArgs": [
      			  "pic"
      			],
      			"touch": "涩图2",
      			"url": "http://iw233.fgimax2.fgnwctvip.com/API/Ghs.php?type=json",
      			"err": "涩图调用失败"
      		  },
      		  {
      			"out": "$1",
      			"outArgs": [
      			  "data"
      			],
      			"touch": "星座运势",
      			"url": "https://api.iyk0.com/xzys/?msg=$1",
      			"err": "星座运势调用失败"
      		  },
      		  {
      			"out": "$1:$2\n$3:$4\n$5:$6\n",
      			"outArgs": [
      			  "data.forecast[0].date",
      			  "data.forecast[0].type",
      			  "data.forecast[1].date",
      			  "data.forecast[1].type",
      			  "data.forecast[2].date",
      			  "data.forecast[2].type"
      			],
      			"touch": "未来天气",
      			"url": "https://api.vvhan.com/api/weather?city=$1&type=week",
      			"err": "未来天气查询失败"
      		  },
      		  {
      			"out": "<Audio:$1>",
      			"outArgs": [
      			  "mp3"
      			],
      			"touch": "小妲己",
      			"url": "http://api.weijieyue.cn/api/xiaodaji/api.php?msg=$1",
      			"err": "调用失败"
      		  },
      		  {
      			"out": "QQ:$1\n评语:$2\n凶吉:$3\n性格:$4",
      			"outArgs": [
      			  "qq",
      			  "pingyu",
      			  "xiongji",
      			  "xingge"
      			],
      			"touch": "QQ凶吉",
      			"url": "http://api.weijieyue.cn/api/qq/xiongji.php?qq=$qid",
      			"err": "调用失败"
      		  }
      	]
      }
      

      麻烦大佬了

      发布在 插件发布
      M
      mantou