MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    [mirai-api-http]梗查询插件——GengSearch

    插件发布
    python mirai-api-http
    25
    182
    36420
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      superen last edited by

      Mirai未运行或未配置mah插件
      错误详情:
      Traceback (most recent call last):
      File "GengSearch.py", line 233, in Listening
      File "simuse.py", line 60, in Fetch_Message
      TypeError: 'int' object is not subscriptable

      save log

      这个是没启动成功 还是下面那3个错了?

      Koreyoshi 1 Reply Last reply Reply Quote 0
      • Koreyoshi
        Koreyoshi @superen last edited by

        @superen data.json文件或者mirai-api-http插件没设置好,host那个选项记得加上端口号,也有可能mirai-api-http被防火墙了

        S 2 Replies Last reply Reply Quote 0
        • S
          superen @Koreyoshi last edited by

          @koreyoshi 已经是你说的这样了 请问一下防火墙是指?

          1 Reply Last reply Reply Quote 0
          • S
            superen @Koreyoshi last edited by

            @koreyoshi 是要同时开启http和ws吗(设置同一地址会报错 单独使用http也不行呢)

            Koreyoshi 1 Reply Last reply Reply Quote 0
            • Koreyoshi
              Koreyoshi @superen last edited by

              @superen 理论上单独开启http也行的,host设置的是0.0.0.0吗?

              S 1 Reply Last reply Reply Quote 0
              • S
                superen @Koreyoshi last edited by

                @koreyoshi 是的 localhost也试过了 在你的里面填的是127

                Koreyoshi 2 Replies Last reply Reply Quote 0
                • Koreyoshi
                  Koreyoshi @superen last edited by

                  @superen 在我的data文件里面那个host要加上端口号,有加上嘛,比如127.0.0.1:1660

                  S 1 Reply Last reply Reply Quote 0
                  • Koreyoshi
                    Koreyoshi @superen last edited by

                    @superen
                    这个是我的mirai-api-http的配置文件,你可以参考下

                    adapters:
                     - http
                     - ws
                    enableVerify: true
                    verifyKey: 1121917292
                    debug: false
                    singleMode: false
                    cacheSize: 4096
                    adapterSettings:
                    
                     http:
                       host: 0.0.0.0
                       port: 1660
                    
                     ws:
                       host: 0.0.0.0
                       port: 990
                       reservedSyncId: -1
                    
                    S 1 Reply Last reply Reply Quote 0
                    • S
                      superen @Koreyoshi last edited by

                      @koreyoshi 有的有的 算了我发你看看

                      adapters:

                      • http
                      • ws

                      enableVerify: true
                      verifyKey: 12345678910

                      开启一些调式信息

                      debug: true

                      singleMode: true
                      cacheSize: 4096
                      adapterSettings:
                      http:
                      host: 0.0.0.0
                      port: 8080
                      cors: ["*"]
                      ws:
                      host: localhost
                      port: 8080
                      reservedSyncId: -1

                      {
                      "Key": "12345678910",
                      "host": "127.0.0.1:8080",
                      "port": "8080",
                      "qq": "5016370",
                      "session": ""
                      }

                      Koreyoshi 1 Reply Last reply Reply Quote 0
                      • S
                        superen @Koreyoshi last edited by

                        @koreyoshi 那看来是只需要http耶

                        Koreyoshi 1 Reply Last reply Reply Quote 0
                        • Koreyoshi
                          Koreyoshi @superen last edited by

                          @superen
                          "host": "127.0.0.1:8080"
                          这里,8080前面那个冒号要用半角的也就是英文输入法下的这个:

                          1 Reply Last reply Reply Quote 0
                          • Koreyoshi
                            Koreyoshi @superen last edited by

                            @superen 尽量切成英文输入法后再修改文件,这样全部符号都是半角的了

                            S 1 Reply Last reply Reply Quote 0
                            • S
                              superen @Koreyoshi last edited by

                              @koreyoshi 好的宝贝 用的服务器眼瓢也没用输入法 犯得低级错误 不过问题好像不在这。。还是不行

                              Koreyoshi 1 Reply Last reply Reply Quote 0
                              • Koreyoshi
                                Koreyoshi @superen last edited by

                                @superen 还是一样的报错吗?

                                S 1 Reply Last reply Reply Quote 0
                                • S
                                  superen @Koreyoshi last edited by

                                  @koreyoshi 是的 挺晚的 要不你先休息?

                                  Koreyoshi 2 Replies Last reply Reply Quote 0
                                  • Koreyoshi
                                    Koreyoshi @superen last edited by

                                    @superen 把mirai-api-http的配置文件的
                                    singleMode: true改成singleMode: false试试

                                    Koreyoshi 1 Reply Last reply Reply Quote 0
                                    • Koreyoshi
                                      Koreyoshi @Koreyoshi last edited by

                                      @koreyoshi 开了singleMode会把QQ和session绑定

                                      S 1 Reply Last reply Reply Quote 0
                                      • Koreyoshi
                                        Koreyoshi @superen last edited by

                                        @superen 改了记得把mirai重启一下)

                                        S 1 Reply Last reply Reply Quote 0
                                        • S
                                          superen @Koreyoshi last edited by

                                          @koreyoshi 牛哇 可以了

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            superen @Koreyoshi last edited by

                                            @koreyoshi 嘿嘿 知道的 。。。

                                            不过启动了 运行却出错了 发现是cookie那多了一个回车 解决了 已经测试可以运行 谢谢了 大晚上的

                                            顺便问一下 看了上面你的回复知道这个查询间隔是特意加上去的 后续会支持修改参数吗

                                            Koreyoshi 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 9
                                            • 10
                                            • 4 / 10
                                            • First post
                                              Last post
                                            Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact