Giter VIP home page Giter VIP logo

pycqbot's Introduction

Hi, I'm FengLiu 👋.

编程只是兴趣,尽力少写 Bug 少堆屎山

别问干嘛去了, 沉迷 mc mod 开发捏 (别沉迷 mod 开发了, 肝死一堆 bug)

多少人来看过了呀...

Links

Github Stars

pycqbot's People

Contributors

dupeiran001 avatar fengliufeseliud avatar haorwen avatar lhlyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pycqbot's Issues

go-cqhttp冲突问题

不知道为什么,添加了图片缓存库打开用pycqbot编制的程序后无法读取图片缓存库。
`当前进程pid: 5528

#################################################################
██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ████████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██╔═══██╗██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝ ╚████╔╝ ██║ ██║ ██║██████╔╝██║ ██║ ██║
██╔═══╝ ╚██╔╝ ██║ ██║▄▄ ██║██╔══██╗██║ ██║ ██║
██║ ██║ ╚██████╗╚██████╔╝██████╔╝╚██████╔╝ ██║
╚═╝ ╚═╝ ╚═════╝ ╚══▀▀═╝ ╚═════╝ ╚═════╝ ╚═╝
v0.5.1.1 BY FengLiu
#################################################################

[2023-05-25 12:34:15,409][go-cqhttp/ERROR] PyCqBot: go-cqhttp 发生致命错误 open cache image db failed: The process cannot access the file because it is being used by another process.`

程序无法执行

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ".\main.py", line 12, in
bot.start()
File "C:\Users\ZGHMVP\Desktop\QQBot\venv\lib\site-packages\pycqBot\socketApp.py", line 245, in start
self.websocket_start()
File "C:\Users\ZGHMVP\Desktop\QQBot\venv\lib\site-packages\pycqBot\socketApp.py", line 269, in websocket_start
asyncio.run(main_logic())
File "C:\Python38\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Python38\lib\asyncio\base_events.py", line 603, in run_until_complete
self.run_forever()
File "C:\Python38\lib\asyncio\windows_events.py", line 316, in run_forever
super().run_forever()
File "C:\Python38\lib\asyncio\base_events.py", line 570, in run_forever
self.run_once()
File "C:\Python38\lib\asyncio\base_events.py", line 1859, in run_once
handle.run()
File "C:\Python38\lib\asyncio\events.py", line 81, in run
self.context.run(self.callback, *self.args)
File "C:\Users\ZGHMVP\Desktop\QQBot\venv\lib\site-packages\pycqBot\socketApp.py", line 263, in main_logic
self.on_error(err)
File "C:\Users\ZGHMVP\Desktop\QQBot\venv\lib\site-packages\pycqBot\socketApp.py", line 309, in on_error
logging.exception(error)
File "C:\Python38\lib\logging_init
.py", line 2057, in exception
error(msg, *args, exc_info=exc_info, **kwargs)
File "C:\Python38\lib\logging_init
.py", line 2049, in error
root.error(msg, *args, **kwargs)
File "C:\Python38\lib\logging_init
.py", line 1475, in error
self.log(ERROR, msg, args, **kwargs)
File "C:\Python38\lib\logging_init
.py", line 1589, in log
self.handle(record)
File "C:\Python38\lib\logging_init
.py", line 1599, in handle
self.callHandlers(record)
File "C:\Python38\lib\logging_init
.py", line 1661, in callHandlers
hdlr.handle(record)
File "C:\Python38\lib\logging_init
.py", line 954, in handle
self.emit(record)
File "C:\Python38\lib\logging_init
.py", line 1085, in emit
msg = self.format(record)
File "C:\Python38\lib\logging_init
.py", line 929, in format
return fmt.format(record)
File "C:\Python38\lib\logging_init
.py", line 676, in format
record.exc_text = self.formatException(record.exc_info)
File "C:\Python38\lib\logging_init
.py", line 626, in formatException
traceback.print_exception(ei[0], ei[1], tb, None, sio)
File "C:\Python38\lib\traceback.py", line 103, in print_exception
for line in TracebackException(
File "C:\Python38\lib\traceback.py", line 481, in init
cause = TracebackException(
File "C:\Python38\lib\traceback.py", line 493, in init
context = TracebackException(
File "C:\Python38\lib\traceback.py", line 508, in init
self.stack = StackSummary.extract(
File "C:\Python38\lib\traceback.py", line 362, in extract
linecache.checkcache(filename)
File "C:\Python38\lib\linecache.py", line 74, in checkcache
stat = os.stat(fullname)
KeyboardInterrupt

0.5.1和0.5.1.1 版本Bug

0.5.1和0.5.1.1版本, bot.on_group_msg, bot.on_private_msg 收不到不到群组和私聊消息, 同样的代码, 切换到0.5.0版本就可以正常接收到消息

突然无法导入库

Traceback (most recent call last):
File "d:\mybot\main.py", line 2, in
from pycqBot.cqApi import cqHttpApi,cqLog
ImportError: cannot import name 'cqHttpApi' from 'pycqBot.cqApi' (C:\Users\Hi\AppData\Local\Programs\Python\Python311\Lib\site-packages\pycqBot\cqApi.py)

内置函数status报错

pyqtBot版本:0.4.5.1
在函数

cqBot.meta_event():
    ...
    self._go_cqhttp_status = message["status"]

中直接引用了heartbeat返回的json数据,但go-cqhttp实际返回的key名和文档中不一致(e.g. 文档中的"PacketReceived"实际为"packet_received",详见最下方补充信息),因此在函数cqBot.status中对self._go_cqhttp_status的索引发生了了KeyError。方便的话,能否在下个版本更新中修改status方法中的key名?

十分感谢!

status方法需要引用对象属性,不便自行定义命令实现;status引用了私有属性cqBot.__bot_qq,在继承、重载status方法时还需要额外重载__bot_qqset_bot_status方法。


以下是补充信息

heartbeat抓包

{
    "post_type": "meta_event",
    "meta_event_type": "heartbeat",
    "time": 1674091663,
    "self_id": "##########",
    "status": {
        "app_enabled": true,
        "app_good": true,
        "app_initialized": true,
        "good": true,
        "online": true,
        "plugins_good": null,
        "stat": {
            "packet_received": 5590,
            "packet_sent": 4793,
            "packet_lost": 0,
            "message_received": 687,
            "message_sent": 21,
            "disconnect_times": 0,
            "lost_times": 0,
            "last_message_time": 1674091216
        }
    },
    "interval": 5000
}

status方法的报错部分

class cqBot(...):
    def __init__(self, ...):
        ...
        def status(_, message):
            ...
            status_msg = "bot (qq=%s) 是否在线:%s\n收到数据包:%s\n发送数据包:%s\n丢失数据包:%s\n接受信息:%s\n发送信息:%s\nTCP 链接断开:%s\n账号掉线次数:%s\n最后消息时间:%s" % (
                self.__bot_qq,
                self._go_cqhttp_status["online"],
                self._go_cqhttp_status["stat"]["PacketReceived"],
                self._go_cqhttp_status["stat"]["PacketSent"],
                self._go_cqhttp_status["stat"]["PacketLost"],
                self._go_cqhttp_status["stat"]["MessageReceived"],
                self._go_cqhttp_status["stat"]["MessageSent"],
                self._go_cqhttp_status["stat"]["DisconnectTimes"],
                self._go_cqhttp_status["stat"]["LostTimes"],
                self._go_cqhttp_status["stat"]["LastMessageTime"],
            )
            ...

文档可否详细点?

from pycqBot.cqApi import cqHttpApi, cqLog

启用日志 默认日志等级 DEBUG

cqLog()

cqapi = cqHttpApi()
bot = cqapi.create_bot()
bot.start()

成功启动可以使用 指令标识符+help 使用内置指令 help

按照官方文档进行了这步操作 然后仔细看文档说需要go-cqhttp文件拷贝到当前目录下,拷贝后需要文件夹名字不 我都试了都是同一个错误

image

运行报错
/Users/rhymed/PycharmProjects/qqBot/venv/bin/python /Users/rhymed/PycharmProjects/qqBot/main.py
[2023-04-11 17:43:24,481][MainThread/DEBUG] PyCqBot: Using selector: KqueueSelector
Exception in thread cqhttp_shell:
Traceback (most recent call last):
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/rhymed/PycharmProjects/qqBot/venv/lib/python3.8/site-packages/pycqBot/socketApp.py", line 221, in cqhttp_start
shell_msg = subp.stdout.readline().decode("utf-8").strip()
UnboundLocalError: local variable 'subp' referenced before assignment

#################################################################
██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ████████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██╔═══██╗██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝ ╚████╔╝ ██║ ██║ ██║██████╔╝██║ ██║ ██║
██╔═══╝ ╚██╔╝ ██║ ██║▄▄ ██║██╔══██╗██║ ██║ ██║
██║ ██║ ╚██████╗╚██████╔╝██████╔╝╚██████╔╝ ██║
╚═╝ ╚═╝ ╚═════╝ ╚══▀▀═╝ ╚═════╝ ╚═════╝ ╚═╝
v0.4.4.1 BY FengLiu
#################################################################

Traceback (most recent call last):
File "/Users/rhymed/PycharmProjects/qqBot/main.py", line 8, in
bot.start()
File "/Users/rhymed/PycharmProjects/qqBot/venv/lib/python3.8/site-packages/pycqBot/socketApp.py", line 242, in start
time.sleep(0.5)
KeyboardInterrupt

创建指令代码运行失败

环境:
芯片 Apple M2
macos 13.3.1 (22E261)
python 3.11.2
gocqhttp 1.0.1
pycqBot 0.5.1.1
运行代码:

from pycqBot import cqHttpApi, cqBot, cqLog
from pycqBot.data import *

cqLog()


def test(command_data, message: Message):
    message.reply("你好!")


bot = cqHttpApi().create_bot()
# 创建指令 "#test"
bot.command(test, "test")

bot.start()

报错代码:

#################################################################
██████╗ ██╗   ██╗ ██████╗ ██████╗ ██████╗  ██████╗ ████████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██╔═══██╗██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝ ╚████╔╝ ██║     ██║   ██║██████╔╝██║   ██║   ██║   
██╔═══╝   ╚██╔╝  ██║     ██║▄▄ ██║██╔══██╗██║   ██║   ██║   
██║        ██║   ╚██████╗╚██████╔╝██████╔╝╚██████╔╝   ██║   
╚═╝        ╚═╝    ╚═════╝ ╚══▀▀═╝ ╚═════╝  ╚═════╝    ╚═╝   
                                            v0.5.1.1  BY FengLiu
#################################################################

[2023-04-26 17:25:00,753][MainThread/DEBUG] PyCqBot: Using selector: KqueueSelector
Exception in thread go-cqhttp:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/kibo/PycharmProjects/wfbot/venv/lib/python3.11/site-packages/pycqBot/cqHttpApi.py", line 335, in cqhttp_start
    shell_msg = subp.stdout.readline().decode("utf-8").strip()
                ^^^^
UnboundLocalError: cannot access local variable 'subp' where it is not associated with a value

内置pixiv插件无法正常被加载

在能正常运行的文件中加入

bot.plugin_load([
    "pycqBot.plugin.pixiv"   
])

后会报错
报错信息:

PS E:\Qbot> & C:/Users/Administrator/AppData/Local/Programs/Python/Python310/python.exe e:/Qbot/main.py
[2022-11-26 11:36:21,916][MainThread/DEBUG] PyCqBot: Using proactor: IocpProactor
Traceback (most recent call last):
  File "e:\Qbot\main.py", line 225, in <module>
    bot.plugin_load([
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\pycqBot\cqApi.py", line 592, in plugin_load
    plugin_config = self._import_plugin_config()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\pycqBot\cqApi.py", line 552, in _import_plugin_config
    return yaml.safe_load(file.read())
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa1 in position 60: illegal multibyte sequence
PS E:\Qbot>

plugin_config.yml

pixiv: 
    forward_qq: 2701711299
    forward_name: "胡桃ちゃん"
    cookie: 85945596_Tu6naZkEsFu5wxosG6K6qRrYQlO8iALw
    # clash 代理默认端口 7890
    proxy: "127.0.0.1:7890"   
    max_pid_len: 20

未加好友的临时消息不存在 target_id 抛出异常

class Private_Message(Message):
    """私聊消息"""

    def __init__(self, cqapi: cqHttpApi, event: Message_Event, message_data: dict[str, Any]) -> None:
        super().__init__(cqapi, event, message_data)

        self.sender: Private_User = Private_User(self._cqapi, message_data["sender"])
        """发送人"""
        
        self.target_id: int = message_data["target_id"] # 抛出异常,target_id 不存在
        """接收者 QQ 号"""

实际接收的 message json

{'post_type': 'message', 'message_type': 'private', 'time': 1689303412, 'self_id': ***, 'sub_type': 'group', 'temp_source': 0, 'message_id': 61502, 'user_id': ***, 'message': '123', 'raw_message': '123', 'font': 0, 'sender': {'age': 0, 'group_id': ***, 'nickname': 'Cody', 'sex': 'unknown', 'user_id': ***}}

貌似没有 target_id 这一项?我理解这里应该是 self_id ?

启动pycqbot失败

python3 main.py
[2022-04-18 15:20:27,636][MainThread/DEBUG] PyCqBot: Using selector: EpollSelector
[2022-04-18 15:20:27,650][cqhttp_shell/ERROR] PyCqBot: go-cqhttp 发生致命错误 打开数据库失败: open backend error: open leveldb error: resource temporarily unavailable

不知道为啥,刚启动一切正常,几个小时候就报错

Traceback (most recent call last):
File "C:\Users\joker\AppData\Local\Programs\Python\Python311\Lib\asyncio\proactor_events.py", line 792, in _loop_self_reading
f.result() # may raise
^^^^^^^^^^
File "C:\Users\joker\AppData\Local\Programs\Python\Python311\Lib\asyncio\windows_events.py", line 846, in _poll
value = callback(transferred, key, ov)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\joker\AppData\Local\Programs\Python\Python311\Lib\asyncio\windows_events.py", line 471, in finish_recv
return ov.getresult()
^^^^^^^^^^^^^^
OSError: [WinError 121] 信号灯超时时间已到

找不到

from pycqBot.cqApi import cqHttpApi, cqLog
ImportError: cannot import name 'cqHttpApi' from 'pycqBot.cqApi'
QQ截图20230511003839
``

程序卡住在 PyCqBot: go-cqhttp 警告 检查更新失败!

在使用 go-cqhttp 启动时,程序会在提示警告 检查更新失败!后继续运行,可以收到消息。然而用PyCqBot启动 go-cqhttp.exe 时,出现 [go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 检查更新失败! 后,程序会卡死。

完整输出:

#################################################################
██████╗ ██╗   ██╗ ██████╗ ██████╗ ██████╗  ██████╗ ████████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██╔═══██╗██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝ ╚████╔╝ ██║     ██║   ██║██████╔╝██║   ██║   ██║
██╔═══╝   ╚██╔╝  ██║     ██║▄▄ ██║██╔══██╗██║   ██║   ██║
██║        ██║   ╚██████╗╚██████╔╝██████╔╝╚██████╔╝   ██║
╚═╝        ╚═╝    ╚═════╝ ╚══▀▀═╝ ╚═════╝  ╚═════╝    ╚═╝
                                            v0.5.1.1  BY FengLiu
#################################################################

[2023-09-10 00:34:48,742][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 Protocol -> device lock is disabled. HTTP API may fail.
[2023-09-10 00:34:50,820][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 检查更新失败!

使用最新版本1.0.0的go-cqhttp会报错

使用最新版本1.0.0的go-cqhttp会报错启动失败
环境
linux:Linux version 5.10.165-143.735.amzn2.x86_64 (mockbuild@ip-10-0-49-80) (gcc10-gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1), GNU ld version 2.35.2-9.amzn2.0.1) #1 SMP Wed Jan 25 03:13:54 UTC 2023
go-cqhttp: 1.0.0
python: 3.7

错误信息:

[root@ip-172-31-4-53 qq-bot]# python3.7 main.py 
[2023-04-05 12:35:22,860][MainThread/DEBUG] PyCqBot: Using selector: EpollSelector
[2023-04-05 12:35:22,862][MainThread/DEBUG] PyCqBot: Using selector: EpollSelector
[2023-04-05 12:35:22,862][MainThread/INFO] PyCqBot: 启动事件循环

#################################################################
██████╗ ██╗   ██╗ ██████╗ ██████╗ ██████╗  ██████╗ ████████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██╔═══██╗██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝ ╚████╔╝ ██║     ██║   ██║██████╔╝██║   ██║   ██║   
██╔═══╝   ╚██╔╝  ██║     ██║▄▄ ██║██╔══██╗██║   ██║   ██║   
██║        ██║   ╚██████╗╚██████╔╝██████╔╝╚██████╔╝   ██║   
╚═╝        ╚═╝    ╚═════╝ ╚══▀▀═╝ ╚═════╝  ╚═════╝    ╚═╝   
                                            v0.4.4.1  BY FengLiu
#################################################################

fatal error: freeIndex is not valid

goroutine 65 [running]:
runtime.throw({0xb0f8fa?, 0xc000113015?})
	runtime/panic.go:1047 +0x5d fp=0xc000389728 sp=0xc0003896f8 pc=0x4350bd
runtime.(*mcache).nextFree(0x7f220e58b108, 0x15)
	runtime/malloc.go:863 +0x176 fp=0xc000389770 sp=0xc000389728 pc=0x40d1f6
runtime.mallocgc(0x80, 0xa1c340, 0x1)
	runtime/malloc.go:1042 +0x44d fp=0xc0003897d8 sp=0xc000389770 pc=0x40d6ed
runtime.makeslice(0xc0003898f0?, 0x1?, 0xc0?)
	runtime/slice.go:103 +0x52 fp=0xc000389800 sp=0xc0003897d8 pc=0x44c312
math/big.(*Int).Bytes(0xc000389988)
	math/big/int.go:499 +0x39 fp=0xc000389830 sp=0xc000389800 pc=0x56f8d9
github.com/Mrs4s/MiraiGo/client/internal/auth.CalcPow({0xc0005485fe?, 0xc00038e690?, 0x546?})
	github.com/Mrs4s/[email protected]/client/internal/auth/pow.go:33 +0x7d2 fp=0xc0003899e0 sp=0xc000389830 pc=0x75dc92
github.com/Mrs4s/MiraiGo/client.decodeLoginResponse(0xc000260000, 0x25d?)
	github.com/Mrs4s/[email protected]/client/decoders.go:52 +0x5aa fp=0xc000389f20 sp=0xc0003899e0 pc=0x7ba1aa
github.com/Mrs4s/MiraiGo/client.(*QQClient).netLoop.func1(0xc00036c240)
	github.com/Mrs4s/[email protected]/client/network.go:405 +0x182 fp=0xc000389fc8 sp=0xc000389f20 pc=0x7ec3c2
github.com/Mrs4s/MiraiGo/client.(*QQClient).netLoop.func6()
	github.com/Mrs4s/[email protected]/client/network.go:421 +0x2a fp=0xc000389fe0 sp=0xc000389fc8 pc=0x7ec20a
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000389fe8 sp=0xc000389fe0 pc=0x4672a1
created by github.com/Mrs4s/MiraiGo/client.(*QQClient).netLoop
	github.com/Mrs4s/[email protected]/client/network.go:390 +0x4cd

goroutine 1 [select]:
runtime.gopark(0xc0002a3898?, 0x2?, 0xa9?, 0xdb?, 0xc0002a3864?)
	runtime/proc.go:381 +0xd6 fp=0xc0002a36d8 sp=0xc0002a36b8 pc=0x437dd6
runtime.selectgo(0xc0002a3898, 0xc0002a3860, 0xb03636?, 0x0, 0xb07169?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc0002a3818 sp=0xc0002a36d8 pc=0x44767e
github.com/Mrs4s/MiraiGo/client.(*QQClient).sendAndWait(0xc000260000, 0x30?, {0xc000359200, 0x5cc, 0x600}, {0x0, 0x0, 0x1?})
	github.com/Mrs4s/[email protected]/client/network.go:239 +0x265 fp=0xc0002a38e8 sp=0xc0002a3818 pc=0x7ea9a5
github.com/Mrs4s/MiraiGo/client.(*QQClient).Login(0xc000260000)
	github.com/Mrs4s/[email protected]/client/client.go:249 +0x77 fp=0xc0002a39d0 sp=0xc0002a38e8 pc=0x7b57d7
github.com/Mrs4s/go-cqhttp/cmd/gocq.commonLogin()
	github.com/Mrs4s/go-cqhttp/cmd/gocq/login.go:73 +0x25 fp=0xc0002a39e8 sp=0xc0002a39d0 pc=0x970a65
github.com/Mrs4s/go-cqhttp/cmd/gocq.LoginInteract()
	github.com/Mrs4s/go-cqhttp/cmd/gocq/main.go:310 +0x175c fp=0xc0002a3f70 sp=0xc0002a39e8 pc=0x974adc
main.main()
	github.com/Mrs4s/go-cqhttp/main.go:20 +0x2a fp=0xc0002a3f80 sp=0xc0002a3f70 pc=0x9ac72a
runtime.main()
	runtime/proc.go:250 +0x207 fp=0xc0002a3fe0 sp=0xc0002a3f80 pc=0x4379a7
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc0002a3fe8 sp=0xc0002a3fe0 pc=0x4672a1

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:381 +0xd6 fp=0xc000046fb0 sp=0xc000046f90 pc=0x437dd6
runtime.goparkunlock(...)
	runtime/proc.go:387
runtime.forcegchelper()
	runtime/proc.go:305 +0xb0 fp=0xc000046fe0 sp=0xc000046fb0 pc=0x437c10
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000046fe8 sp=0xc000046fe0 pc=0x4672a1
created by runtime.init.6
	runtime/proc.go:293 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:381 +0xd6 fp=0xc000047780 sp=0xc000047760 pc=0x437dd6
runtime.goparkunlock(...)
	runtime/proc.go:387
runtime.bgsweep(0x0?)
	runtime/mgcsweep.go:319 +0xde fp=0xc0000477c8 sp=0xc000047780 pc=0x423fbe
runtime.gcenable.func1()
	runtime/mgc.go:178 +0x26 fp=0xc0000477e0 sp=0xc0000477c8 pc=0x419246
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc0000477e8 sp=0xc0000477e0 pc=0x4672a1
created by runtime.gcenable
	runtime/mgc.go:178 +0x6b

goroutine 4 [runnable]:
runtime.gopark(0xc00005e000?, 0xbf3ad8?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:381 +0xd6 fp=0xc000047f70 sp=0xc000047f50 pc=0x437dd6
runtime.goparkunlock(...)
	runtime/proc.go:387
runtime.(*scavengerState).park(0xfa7e60)
	runtime/mgcscavenge.go:400 +0x53 fp=0xc000047fa0 sp=0xc000047f70 pc=0x421eb3
runtime.bgscavenge(0x0?)
	runtime/mgcscavenge.go:633 +0x65 fp=0xc000047fc8 sp=0xc000047fa0 pc=0x4224a5
runtime.gcenable.func2()
	runtime/mgc.go:179 +0x26 fp=0xc000047fe0 sp=0xc000047fc8 pc=0x4191e6
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000047fe8 sp=0xc000047fe0 pc=0x4672a1
created by runtime.gcenable
	runtime/mgc.go:179 +0xaa

goroutine 5 [finalizer wait]:
runtime.gopark(0x438152?, 0x437b45?, 0x0?, 0x0?, 0xc000046770?)
	runtime/proc.go:381 +0xd6 fp=0xc000046628 sp=0xc000046608 pc=0x437dd6
runtime.runfinq()
	runtime/mfinal.go:193 +0x107 fp=0xc0000467e0 sp=0xc000046628 pc=0x418287
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc0000467e8 sp=0xc0000467e0 pc=0x4672a1
created by runtime.createfing
	runtime/mfinal.go:163 +0x45

goroutine 6 [GC worker (idle)]:
runtime.gopark(0xe3632b656d4b1?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:381 +0xd6 fp=0xc000048750 sp=0xc000048730 pc=0x437dd6
runtime.gcBgMarkWorker()
	runtime/mgc.go:1275 +0xf1 fp=0xc0000487e0 sp=0xc000048750 pc=0x41afb1
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc0000487e8 sp=0xc0000487e0 pc=0x4672a1
created by runtime.gcBgMarkStartWorkers
	runtime/mgc.go:1199 +0x25

goroutine 7 [select]:
runtime.gopark(0xc00010ed90?, 0x7?, 0x0?, 0x0?, 0xc00010e9ba?)
	runtime/proc.go:381 +0xd6 fp=0xc00010e7f0 sp=0xc00010e7d0 pc=0x437dd6
runtime.selectgo(0xc00010ed90, 0xc00010e9ac, 0x1?, 0x0, 0x4b724b0393e34870?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc00010e930 sp=0xc00010e7f0 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*session).refLoop(0xc0000b41e0)
	github.com/syndtr/[email protected]/leveldb/session_util.go:189 +0x59b fp=0xc00010efc8 sp=0xc00010e930 pc=0x8bd25b
github.com/syndtr/goleveldb/leveldb.newSession.func1()
	github.com/syndtr/[email protected]/leveldb/session.go:93 +0x26 fp=0xc00010efe0 sp=0xc00010efc8 pc=0x8b6d66
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc00010efe8 sp=0xc00010efe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.newSession
	github.com/syndtr/[email protected]/leveldb/session.go:93 +0x2e5

goroutine 8 [select]:
runtime.gopark(0xc000043f28?, 0x2?, 0x0?, 0x0?, 0xc000043ed0?)
	runtime/proc.go:381 +0xd6 fp=0xc000043d40 sp=0xc000043d20 pc=0x437dd6
runtime.selectgo(0xc000043f28, 0xc000043ecc, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000043e80 sp=0xc000043d40 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).compactionError(0xc0000fe1c0)
	github.com/syndtr/[email protected]/leveldb/db_compaction.go:91 +0x137 fp=0xc000043fc8 sp=0xc000043e80 pc=0x8a57b7
github.com/syndtr/goleveldb/leveldb.openDB.func1()
	github.com/syndtr/[email protected]/leveldb/db.go:148 +0x26 fp=0xc000043fe0 sp=0xc000043fc8 pc=0x89f806
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000043fe8 sp=0xc000043fe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:148 +0x4ea

goroutine 9 [select]:
runtime.gopark(0xc000044798?, 0x2?, 0x4?, 0x0?, 0xc000044764?)
	runtime/proc.go:381 +0xd6 fp=0xc0000445e8 sp=0xc0000445c8 pc=0x437dd6
runtime.selectgo(0xc000044798, 0xc000044760, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000044728 sp=0xc0000445e8 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain(0xc0000fe1c0)
	github.com/syndtr/[email protected]/leveldb/db_state.go:101 +0xa8 fp=0xc0000447c8 sp=0xc000044728 pc=0x8aef08
github.com/syndtr/goleveldb/leveldb.openDB.func2()
	github.com/syndtr/[email protected]/leveldb/db.go:149 +0x26 fp=0xc0000447e0 sp=0xc0000447c8 pc=0x89f7a6
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc0000447e8 sp=0xc0000447e0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:149 +0x52a

goroutine 10 [select]:
runtime.gopark(0xc000044f10?, 0x3?, 0x0?, 0x0?, 0xc000044e5e?)
	runtime/proc.go:381 +0xd6 fp=0xc000110ca0 sp=0xc000110c80 pc=0x437dd6
runtime.selectgo(0xc000110f10, 0xc000044e58, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000110de0 sp=0xc000110ca0 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).tCompaction(0xc0000fe1c0)
	github.com/syndtr/[email protected]/leveldb/db_compaction.go:836 +0x6b7 fp=0xc000110fc8 sp=0xc000110de0 pc=0x8ab157
github.com/syndtr/goleveldb/leveldb.openDB.func3()
	github.com/syndtr/[email protected]/leveldb/db.go:155 +0x26 fp=0xc000110fe0 sp=0xc000110fc8 pc=0x89f746
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000110fe8 sp=0xc000110fe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:155 +0x59b

goroutine 11 [select]:
runtime.gopark(0xc000045790?, 0x2?, 0x0?, 0x0?, 0xc000045754?)
	runtime/proc.go:381 +0xd6 fp=0xc0000455d8 sp=0xc0000455b8 pc=0x437dd6
runtime.selectgo(0xc000045790, 0xc000045750, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000045718 sp=0xc0000455d8 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction(0xc0000fe1c0)
	github.com/syndtr/[email protected]/leveldb/db_compaction.go:773 +0x113 fp=0xc0000457c8 sp=0xc000045718 pc=0x8aa913
github.com/syndtr/goleveldb/leveldb.openDB.func4()
	github.com/syndtr/[email protected]/leveldb/db.go:156 +0x26 fp=0xc0000457e0 sp=0xc0000457c8 pc=0x89f6e6
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc0000457e8 sp=0xc0000457e0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:156 +0x5d8

goroutine 12 [select]:
runtime.gopark(0xc00010fd90?, 0x7?, 0x0?, 0x0?, 0xc00010f9ba?)
	runtime/proc.go:381 +0xd6 fp=0xc00010f7f0 sp=0xc00010f7d0 pc=0x437dd6
runtime.selectgo(0xc00010fd90, 0xc00010f9ac, 0x1?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc00010f930 sp=0xc00010f7f0 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*session).refLoop(0xc0000b42d0)
	github.com/syndtr/[email protected]/leveldb/session_util.go:189 +0x59b fp=0xc00010ffc8 sp=0xc00010f930 pc=0x8bd25b
github.com/syndtr/goleveldb/leveldb.newSession.func1()
	github.com/syndtr/[email protected]/leveldb/session.go:93 +0x26 fp=0xc00010ffe0 sp=0xc00010ffc8 pc=0x8b6d66
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc00010ffe8 sp=0xc00010ffe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.newSession
	github.com/syndtr/[email protected]/leveldb/session.go:93 +0x2e5

goroutine 13 [select]:
runtime.gopark(0xc000044f28?, 0x2?, 0x5e?, 0x4e?, 0xc000044ed0?)
	runtime/proc.go:381 +0xd6 fp=0xc000044d40 sp=0xc000044d20 pc=0x437dd6
runtime.selectgo(0xc000044f28, 0xc000044ecc, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000044e80 sp=0xc000044d40 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).compactionError(0xc0000fe380)
	github.com/syndtr/[email protected]/leveldb/db_compaction.go:91 +0x137 fp=0xc000044fc8 sp=0xc000044e80 pc=0x8a57b7
github.com/syndtr/goleveldb/leveldb.openDB.func1()
	github.com/syndtr/[email protected]/leveldb/db.go:148 +0x26 fp=0xc000044fe0 sp=0xc000044fc8 pc=0x89f806
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000044fe8 sp=0xc000044fe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:148 +0x4ea

goroutine 14 [select]:
runtime.gopark(0xc000045f98?, 0x2?, 0x0?, 0x2d?, 0xc000045f64?)
	runtime/proc.go:381 +0xd6 fp=0xc000045de8 sp=0xc000045dc8 pc=0x437dd6
runtime.selectgo(0xc000045f98, 0xc000045f60, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000045f28 sp=0xc000045de8 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain(0xc0000fe380)
	github.com/syndtr/[email protected]/leveldb/db_state.go:101 +0xa8 fp=0xc000045fc8 sp=0xc000045f28 pc=0x8aef08
github.com/syndtr/goleveldb/leveldb.openDB.func2()
	github.com/syndtr/[email protected]/leveldb/db.go:149 +0x26 fp=0xc000045fe0 sp=0xc000045fc8 pc=0x89f7a6
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000045fe8 sp=0xc000045fe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:149 +0x52a

goroutine 15 [select]:
runtime.gopark(0xc000048f10?, 0x3?, 0x0?, 0x0?, 0xc000048e5e?)
	runtime/proc.go:381 +0xd6 fp=0xc00010aca0 sp=0xc00010ac80 pc=0x437dd6
runtime.selectgo(0xc00010af10, 0xc000048e58, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc00010ade0 sp=0xc00010aca0 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).tCompaction(0xc0000fe380)
	github.com/syndtr/[email protected]/leveldb/db_compaction.go:836 +0x6b7 fp=0xc00010afc8 sp=0xc00010ade0 pc=0x8ab157
github.com/syndtr/goleveldb/leveldb.openDB.func3()
	github.com/syndtr/[email protected]/leveldb/db.go:155 +0x26 fp=0xc00010afe0 sp=0xc00010afc8 pc=0x89f746
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc00010afe8 sp=0xc00010afe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:155 +0x59b

goroutine 16 [select]:
runtime.gopark(0xc000049790?, 0x2?, 0x0?, 0x0?, 0xc000049754?)
	runtime/proc.go:381 +0xd6 fp=0xc0000495d8 sp=0xc0000495b8 pc=0x437dd6
runtime.selectgo(0xc000049790, 0xc000049750, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000049718 sp=0xc0000495d8 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction(0xc0000fe380)
	github.com/syndtr/[email protected]/leveldb/db_compaction.go:773 +0x113 fp=0xc0000497c8 sp=0xc000049718 pc=0x8aa913
github.com/syndtr/goleveldb/leveldb.openDB.func4()
	github.com/syndtr/[email protected]/leveldb/db.go:156 +0x26 fp=0xc0000497e0 sp=0xc0000497c8 pc=0x89f6e6
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc0000497e8 sp=0xc0000497e0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:156 +0x5d8

goroutine 17 [select]:
runtime.gopark(0xc000111d90?, 0x7?, 0x0?, 0x0?, 0xc0001119ba?)
	runtime/proc.go:381 +0xd6 fp=0xc0001117f0 sp=0xc0001117d0 pc=0x437dd6
runtime.selectgo(0xc000111d90, 0xc0001119ac, 0x1?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000111930 sp=0xc0001117f0 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*session).refLoop(0xc0000b43c0)
	github.com/syndtr/[email protected]/leveldb/session_util.go:189 +0x59b fp=0xc000111fc8 sp=0xc000111930 pc=0x8bd25b
github.com/syndtr/goleveldb/leveldb.newSession.func1()
	github.com/syndtr/[email protected]/leveldb/session.go:93 +0x26 fp=0xc000111fe0 sp=0xc000111fc8 pc=0x8b6d66
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000111fe8 sp=0xc000111fe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.newSession
	github.com/syndtr/[email protected]/leveldb/session.go:93 +0x2e5

goroutine 18 [select]:
runtime.gopark(0xc000049f28?, 0x2?, 0x0?, 0x0?, 0xc000049ed0?)
	runtime/proc.go:381 +0xd6 fp=0xc000049d40 sp=0xc000049d20 pc=0x437dd6
runtime.selectgo(0xc000049f28, 0xc000049ecc, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000049e80 sp=0xc000049d40 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).compactionError(0xc0000fe540)
	github.com/syndtr/[email protected]/leveldb/db_compaction.go:91 +0x137 fp=0xc000049fc8 sp=0xc000049e80 pc=0x8a57b7
github.com/syndtr/goleveldb/leveldb.openDB.func1()
	github.com/syndtr/[email protected]/leveldb/db.go:148 +0x26 fp=0xc000049fe0 sp=0xc000049fc8 pc=0x89f806
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000049fe8 sp=0xc000049fe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:148 +0x4ea

goroutine 19 [select]:
runtime.gopark(0xc000233f98?, 0x2?, 0x10?, 0x0?, 0xc000233f64?)
	runtime/proc.go:381 +0xd6 fp=0xc000233de8 sp=0xc000233dc8 pc=0x437dd6
runtime.selectgo(0xc000233f98, 0xc000233f60, 0x6e45206572615772?, 0x0, 0x69666e6f6378696c?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000233f28 sp=0xc000233de8 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain(0xc0000fe540)
	github.com/syndtr/[email protected]/leveldb/db_state.go:101 +0xa8 fp=0xc000233fc8 sp=0xc000233f28 pc=0x8aef08
github.com/syndtr/goleveldb/leveldb.openDB.func2()
	github.com/syndtr/[email protected]/leveldb/db.go:149 +0x26 fp=0xc000233fe0 sp=0xc000233fc8 pc=0x89f7a6
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000233fe8 sp=0xc000233fe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:149 +0x52a

goroutine 20 [select]:
runtime.gopark(0xc000234710?, 0x3?, 0xa?, 0x65?, 0xc00023465e?)
	runtime/proc.go:381 +0xd6 fp=0xc00010bca0 sp=0xc00010bc80 pc=0x437dd6
runtime.selectgo(0xc00010bf10, 0xc000234658, 0x737061636e452079?, 0x0, 0x6c6f636f746f7250?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc00010bde0 sp=0xc00010bca0 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).tCompaction(0xc0000fe540)
	github.com/syndtr/[email protected]/leveldb/db_compaction.go:836 +0x6b7 fp=0xc00010bfc8 sp=0xc00010bde0 pc=0x8ab157
github.com/syndtr/goleveldb/leveldb.openDB.func3()
	github.com/syndtr/[email protected]/leveldb/db.go:155 +0x26 fp=0xc00010bfe0 sp=0xc00010bfc8 pc=0x89f746
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc00010bfe8 sp=0xc00010bfe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:155 +0x59b

goroutine 21 [select]:
runtime.gopark(0xc000234f90?, 0x2?, 0x20?, 0x20?, 0xc000234f54?)
	runtime/proc.go:381 +0xd6 fp=0xc000234dd8 sp=0xc000234db8 pc=0x437dd6
runtime.selectgo(0xc000234f90, 0xc000234f50, 0x2020202020202020?, 0x0, 0x6d646b0a53544847?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000234f18 sp=0xc000234dd8 pc=0x44767e
github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction(0xc0000fe540)
	github.com/syndtr/[email protected]/leveldb/db_compaction.go:773 +0x113 fp=0xc000234fc8 sp=0xc000234f18 pc=0x8aa913
github.com/syndtr/goleveldb/leveldb.openDB.func4()
	github.com/syndtr/[email protected]/leveldb/db.go:156 +0x26 fp=0xc000234fe0 sp=0xc000234fc8 pc=0x89f6e6
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000234fe8 sp=0xc000234fe0 pc=0x4672a1
created by github.com/syndtr/goleveldb/leveldb.openDB
	github.com/syndtr/[email protected]/leveldb/db.go:156 +0x5d8

goroutine 31 [chan receive]:
runtime.gopark(0xc00010ce40?, 0x43defc?, 0x88?, 0xce?, 0x45422f?)
	runtime/proc.go:381 +0xd6 fp=0xc00010ce30 sp=0xc00010ce10 pc=0x437dd6
runtime.chanrecv(0xc000671e00, 0xc00010cf58, 0x1)
	runtime/chan.go:583 +0x49d fp=0xc00010cec0 sp=0xc00010ce30 pc=0x406f5d
runtime.chanrecv1(0x37e11d600?, 0x0?)
	runtime/chan.go:442 +0x18 fp=0xc00010cee8 sp=0xc00010cec0 pc=0x406a98
github.com/Mrs4s/MiraiGo/utils.NewCache[...].func1()
	github.com/Mrs4s/[email protected]/utils/ttl.go:34 +0x7d fp=0xc00010cfe0 sp=0xc00010cee8 pc=0x80177d
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc00010cfe8 sp=0xc00010cfe0 pc=0x4672a1
created by github.com/Mrs4s/MiraiGo/utils.NewCache[...]
	github.com/Mrs4s/[email protected]/utils/ttl.go:30 +0xd8

goroutine 29 [IO wait]:
runtime.gopark(0xfd8f20?, 0xb?, 0x0?, 0x0?, 0x13?)
	runtime/proc.go:381 +0xd6 fp=0xc000286600 sp=0xc0002865e0 pc=0x437dd6
runtime.netpollblock(0x4cb145?, 0x40482f?, 0x0?)
	runtime/netpoll.go:527 +0xf7 fp=0xc000286638 sp=0xc000286600 pc=0x430697
internal/poll.runtime_pollWait(0x7f21e7207fe8, 0x72)
	runtime/netpoll.go:306 +0x89 fp=0xc000286658 sp=0xc000286638 pc=0x461aa9
internal/poll.(*pollDesc).wait(0xc0000b7a00?, 0xc000265000?, 0x0)
	internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc000286680 sp=0xc000286658 pc=0x4e72f2
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0000b7a00, {0xc000265000, 0x1000, 0x1000})
	internal/poll/fd_unix.go:167 +0x299 fp=0xc000286718 sp=0xc000286680 pc=0x4e86d9
net.(*netFD).Read(0xc0000b7a00, {0xc000265000?, 0xc000098388?, 0x0?})
	net/fd_posix.go:55 +0x29 fp=0xc000286760 sp=0xc000286718 pc=0x5dd329
net.(*conn).Read(0xc000012010, {0xc000265000?, 0xc?, 0x26?})
	net/net.go:183 +0x45 fp=0xc0002867a8 sp=0xc000286760 pc=0x5eba05
net.(*TCPConn).Read(0xc000286840?, {0xc000265000?, 0xc00067cf30?, 0x18?})
	<autogenerated>:1 +0x29 fp=0xc0002867d8 sp=0xc0002867a8 pc=0x5fe349
crypto/tls.(*atLeastReader).Read(0xc00067cf30, {0xc000265000?, 0xc00067cf30?, 0x0?})
	crypto/tls/conn.go:788 +0x3d fp=0xc000286820 sp=0xc0002867d8 pc=0x63dafd
bytes.(*Buffer).ReadFrom(0xc0000a4990, {0xbf8dc0, 0xc00067cf30})
	bytes/buffer.go:202 +0x98 fp=0xc000286878 sp=0xc000286820 pc=0x47b3d8
crypto/tls.(*Conn).readFromUntil(0xc0000a4700, {0xbf9c60?, 0xc000012010}, 0xe?)
	crypto/tls/conn.go:810 +0xe5 fp=0xc0002868b8 sp=0xc000286878 pc=0x63dce5
crypto/tls.(*Conn).readRecordOrCCS(0xc0000a4700, 0x0)
	crypto/tls/conn.go:617 +0x116 fp=0xc000286c18 sp=0xc0002868b8 pc=0x63b1d6
crypto/tls.(*Conn).readRecord(...)
	crypto/tls/conn.go:583
crypto/tls.(*Conn).Read(0xc0000a4700, {0xc000264000, 0x1000, 0x14?})
	crypto/tls/conn.go:1316 +0x16f fp=0xc000286c88 sp=0xc000286c18 pc=0x6410cf
net/http.(*persistConn).Read(0xc000098a20, {0xc000264000?, 0xc00015bc80?, 0xc000286d30?})
	net/http/transport.go:1943 +0x4e fp=0xc000286ce8 sp=0xc000286c88 pc=0x6fb4ce
bufio.(*Reader).fill(0xc000671b00)
	bufio/bufio.go:106 +0xff fp=0xc000286d20 sp=0xc000286ce8 pc=0x48813f
bufio.(*Reader).Peek(0xc000671b00, 0x1)
	bufio/bufio.go:144 +0x5d fp=0xc000286d40 sp=0xc000286d20 pc=0x48829d
net/http.(*persistConn).readLoop(0xc000098a20)
	net/http/transport.go:2107 +0x1ac fp=0xc000286fc8 sp=0xc000286d40 pc=0x6fc2ec
net/http.(*Transport).dialConn.func5()
	net/http/transport.go:1765 +0x26 fp=0xc000286fe0 sp=0xc000286fc8 pc=0x6faa86
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000286fe8 sp=0xc000286fe0 pc=0x4672a1
created by net/http.(*Transport).dialConn
	net/http/transport.go:1765 +0x16ea

goroutine 30 [select]:
runtime.gopark(0xc000287f90?, 0x2?, 0xf8?, 0x7d?, 0xc000287f34?)
	runtime/proc.go:381 +0xd6 fp=0xc000287db0 sp=0xc000287d90 pc=0x437dd6
runtime.selectgo(0xc000287f90, 0xc000287f30, 0xc000149040?, 0x0, 0xc000254b40?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000287ef0 sp=0xc000287db0 pc=0x44767e
net/http.(*persistConn).writeLoop(0xc000098a20)
	net/http/transport.go:2410 +0xf2 fp=0xc000287fc8 sp=0xc000287ef0 pc=0x6fdfb2
net/http.(*Transport).dialConn.func6()
	net/http/transport.go:1766 +0x26 fp=0xc000287fe0 sp=0xc000287fc8 pc=0x6faa26
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000287fe8 sp=0xc000287fe0 pc=0x4672a1
created by net/http.(*Transport).dialConn
	net/http/transport.go:1766 +0x173d

goroutine 32 [chan receive]:
runtime.gopark(0xc00010de40?, 0x43defc?, 0x88?, 0xde?, 0x45422f?)
	runtime/proc.go:381 +0xd6 fp=0xc00010de30 sp=0xc00010de10 pc=0x437dd6
runtime.chanrecv(0xc000671ec0, 0xc00010df58, 0x1)
	runtime/chan.go:583 +0x49d fp=0xc00010dec0 sp=0xc00010de30 pc=0x406f5d
runtime.chanrecv1(0x37e11d600?, 0x0?)
	runtime/chan.go:442 +0x18 fp=0xc00010dee8 sp=0xc00010dec0 pc=0x406a98
github.com/Mrs4s/MiraiGo/utils.NewCache[...].func1()
	github.com/Mrs4s/[email protected]/utils/ttl.go:34 +0x7d fp=0xc00010dfe0 sp=0xc00010dee8 pc=0x80177d
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc00010dfe8 sp=0xc00010dfe0 pc=0x4672a1
created by github.com/Mrs4s/MiraiGo/utils.NewCache[...]
	github.com/Mrs4s/[email protected]/utils/ttl.go:30 +0xd8

goroutine 33 [chan receive]:
runtime.gopark(0xc000233640?, 0x43defc?, 0x88?, 0x36?, 0x45422f?)
	runtime/proc.go:381 +0xd6 fp=0xc000233630 sp=0xc000233610 pc=0x437dd6
runtime.chanrecv(0xc000671f80, 0xc000233758, 0x1)
	runtime/chan.go:583 +0x49d fp=0xc0002336c0 sp=0xc000233630 pc=0x406f5d
runtime.chanrecv1(0x37e11d600?, 0x6967617373654d20?)
	runtime/chan.go:442 +0x18 fp=0xc0002336e8 sp=0xc0002336c0 pc=0x406a98
github.com/Mrs4s/MiraiGo/utils.NewCache[...].func1()
	github.com/Mrs4s/[email protected]/utils/ttl.go:34 +0x7d fp=0xc0002337e0 sp=0xc0002336e8 pc=0x80177d
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc0002337e8 sp=0xc0002337e0 pc=0x4672a1
created by github.com/Mrs4s/MiraiGo/utils.NewCache[...]
	github.com/Mrs4s/[email protected]/utils/ttl.go:30 +0xd8

goroutine 40 [IO wait]:
runtime.gopark(0xf59ce64076bab7dd?, 0xb?, 0x0?, 0x0?, 0x14?)
	runtime/proc.go:381 +0xd6 fp=0xc000282600 sp=0xc0002825e0 pc=0x437dd6
runtime.netpollblock(0x4cb145?, 0x40482f?, 0x0?)
	runtime/netpoll.go:527 +0xf7 fp=0xc000282638 sp=0xc000282600 pc=0x430697
internal/poll.runtime_pollWait(0x7f21e7207ef8, 0x72)
	runtime/netpoll.go:306 +0x89 fp=0xc000282658 sp=0xc000282638 pc=0x461aa9
internal/poll.(*pollDesc).wait(0xc0000b7200?, 0xc00034a000?, 0x0)
	internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc000282680 sp=0xc000282658 pc=0x4e72f2
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0000b7200, {0xc00034a000, 0x1300, 0x1300})
	internal/poll/fd_unix.go:167 +0x299 fp=0xc000282718 sp=0xc000282680 pc=0x4e86d9
net.(*netFD).Read(0xc0000b7200, {0xc00034a000?, 0xc00034a00d?, 0x2b8?})
	net/fd_posix.go:55 +0x29 fp=0xc000282760 sp=0xc000282718 pc=0x5dd329
net.(*conn).Read(0xc0000121e0, {0xc00034a000?, 0x12f3?, 0xc00034a005?})
	net/net.go:183 +0x45 fp=0xc0002827a8 sp=0xc000282760 pc=0x5eba05
net.(*TCPConn).Read(0xc000282840?, {0xc00034a000?, 0xc00067d440?, 0x18?})
	<autogenerated>:1 +0x29 fp=0xc0002827d8 sp=0xc0002827a8 pc=0x5fe349
crypto/tls.(*atLeastReader).Read(0xc00067d440, {0xc00034a000?, 0xc00067d440?, 0x0?})
	crypto/tls/conn.go:788 +0x3d fp=0xc000282820 sp=0xc0002827d8 pc=0x63dafd
bytes.(*Buffer).ReadFrom(0xc0000a5090, {0xbf8dc0, 0xc00067d440})
	bytes/buffer.go:202 +0x98 fp=0xc000282878 sp=0xc000282820 pc=0x47b3d8
crypto/tls.(*Conn).readFromUntil(0xc0000a4e00, {0xbf9c60?, 0xc0000121e0}, 0x1300?)
	crypto/tls/conn.go:810 +0xe5 fp=0xc0002828b8 sp=0xc000282878 pc=0x63dce5
crypto/tls.(*Conn).readRecordOrCCS(0xc0000a4e00, 0x0)
	crypto/tls/conn.go:617 +0x116 fp=0xc000282c18 sp=0xc0002828b8 pc=0x63b1d6
crypto/tls.(*Conn).readRecord(...)
	crypto/tls/conn.go:583
crypto/tls.(*Conn).Read(0xc0000a4e00, {0xc000122000, 0x1000, 0x14?})
	crypto/tls/conn.go:1316 +0x16f fp=0xc000282c88 sp=0xc000282c18 pc=0x6410cf
net/http.(*persistConn).Read(0xc000098b40, {0xc000122000?, 0xc000290180?, 0xc000282d30?})
	net/http/transport.go:1943 +0x4e fp=0xc000282ce8 sp=0xc000282c88 pc=0x6fb4ce
bufio.(*Reader).fill(0xc00027f0e0)
	bufio/bufio.go:106 +0xff fp=0xc000282d20 sp=0xc000282ce8 pc=0x48813f
bufio.(*Reader).Peek(0xc00027f0e0, 0x1)
	bufio/bufio.go:144 +0x5d fp=0xc000282d40 sp=0xc000282d20 pc=0x48829d
net/http.(*persistConn).readLoop(0xc000098b40)
	net/http/transport.go:2107 +0x1ac fp=0xc000282fc8 sp=0xc000282d40 pc=0x6fc2ec
net/http.(*Transport).dialConn.func5()
	net/http/transport.go:1765 +0x26 fp=0xc000282fe0 sp=0xc000282fc8 pc=0x6faa86
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000282fe8 sp=0xc000282fe0 pc=0x4672a1
created by net/http.(*Transport).dialConn
	net/http/transport.go:1765 +0x16ea

goroutine 41 [select]:
runtime.gopark(0xc000283f90?, 0x2?, 0xf8?, 0x3d?, 0xc000283f34?)
	runtime/proc.go:381 +0xd6 fp=0xc000283db0 sp=0xc000283d90 pc=0x437dd6
runtime.selectgo(0xc000283f90, 0xc000283f30, 0xc000149700?, 0x0, 0xc000292660?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000283ef0 sp=0xc000283db0 pc=0x44767e
net/http.(*persistConn).writeLoop(0xc000098b40)
	net/http/transport.go:2410 +0xf2 fp=0xc000283fc8 sp=0xc000283ef0 pc=0x6fdfb2
net/http.(*Transport).dialConn.func6()
	net/http/transport.go:1766 +0x26 fp=0xc000283fe0 sp=0xc000283fc8 pc=0x6faa26
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000283fe8 sp=0xc000283fe0 pc=0x4672a1
created by net/http.(*Transport).dialConn
	net/http/transport.go:1766 +0x173d

goroutine 47 [IO wait]:
runtime.gopark(0xc0ddf8f03063e13a?, 0xb?, 0x0?, 0x0?, 0x15?)
	runtime/proc.go:381 +0xd6 fp=0xc000284600 sp=0xc0002845e0 pc=0x437dd6
runtime.netpollblock(0x4cb145?, 0x40482f?, 0x0?)
	runtime/netpoll.go:527 +0xf7 fp=0xc000284638 sp=0xc000284600 pc=0x430697
internal/poll.runtime_pollWait(0x7f21e72080d8, 0x72)
	runtime/netpoll.go:306 +0x89 fp=0xc000284658 sp=0xc000284638 pc=0x461aa9
internal/poll.(*pollDesc).wait(0xc0000b7500?, 0xc0000cea00?, 0x0)
	internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc000284680 sp=0xc000284658 pc=0x4e72f2
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0000b7500, {0xc0000cea00, 0x1500, 0x1500})
	internal/poll/fd_unix.go:167 +0x299 fp=0xc000284718 sp=0xc000284680 pc=0x4e86d9
net.(*netFD).Read(0xc0000b7500, {0xc0000cea00?, 0xc0000cea0d?, 0x3d6?})
	net/fd_posix.go:55 +0x29 fp=0xc000284760 sp=0xc000284718 pc=0x5dd329
net.(*conn).Read(0xc0000123b0, {0xc0000cea00?, 0x14f3?, 0xc0000cea05?})
	net/net.go:183 +0x45 fp=0xc0002847a8 sp=0xc000284760 pc=0x5eba05
net.(*TCPConn).Read(0xc000284840?, {0xc0000cea00?, 0xc00067d860?, 0x18?})
	<autogenerated>:1 +0x29 fp=0xc0002847d8 sp=0xc0002847a8 pc=0x5fe349
crypto/tls.(*atLeastReader).Read(0xc00067d860, {0xc0000cea00?, 0xc00067d860?, 0x0?})
	crypto/tls/conn.go:788 +0x3d fp=0xc000284820 sp=0xc0002847d8 pc=0x63dafd
bytes.(*Buffer).ReadFrom(0xc0000a5790, {0xbf8dc0, 0xc00067d860})
	bytes/buffer.go:202 +0x98 fp=0xc000284878 sp=0xc000284820 pc=0x47b3d8
crypto/tls.(*Conn).readFromUntil(0xc0000a5500, {0xbf9c60?, 0xc0000123b0}, 0x1500?)
	crypto/tls/conn.go:810 +0xe5 fp=0xc0002848b8 sp=0xc000284878 pc=0x63dce5
crypto/tls.(*Conn).readRecordOrCCS(0xc0000a5500, 0x0)
	crypto/tls/conn.go:617 +0x116 fp=0xc000284c18 sp=0xc0002848b8 pc=0x63b1d6
crypto/tls.(*Conn).readRecord(...)
	crypto/tls/conn.go:583
crypto/tls.(*Conn).Read(0xc0000a5500, {0xc000368000, 0x1000, 0x1b?})
	crypto/tls/conn.go:1316 +0x16f fp=0xc000284c88 sp=0xc000284c18 pc=0x6410cf
net/http.(*persistConn).Read(0xc000098d80, {0xc000368000?, 0xc000290840?, 0xc000284d30?})
	net/http/transport.go:1943 +0x4e fp=0xc000284ce8 sp=0xc000284c88 pc=0x6fb4ce
bufio.(*Reader).fill(0xc000366240)
	bufio/bufio.go:106 +0xff fp=0xc000284d20 sp=0xc000284ce8 pc=0x48813f
bufio.(*Reader).Peek(0xc000366240, 0x1)
	bufio/bufio.go:144 +0x5d fp=0xc000284d40 sp=0xc000284d20 pc=0x48829d
net/http.(*persistConn).readLoop(0xc000098d80)
	net/http/transport.go:2107 +0x1ac fp=0xc000284fc8 sp=0xc000284d40 pc=0x6fc2ec
net/http.(*Transport).dialConn.func5()
	net/http/transport.go:1765 +0x26 fp=0xc000284fe0 sp=0xc000284fc8 pc=0x6faa86
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000284fe8 sp=0xc000284fe0 pc=0x4672a1
created by net/http.(*Transport).dialConn
	net/http/transport.go:1765 +0x16ea

goroutine 48 [select]:
runtime.gopark(0xc000285f90?, 0x2?, 0xf8?, 0x5d?, 0xc000285f34?)
	runtime/proc.go:381 +0xd6 fp=0xc000285db0 sp=0xc000285d90 pc=0x437dd6
runtime.selectgo(0xc000285f90, 0xc000285f30, 0xc000077e80?, 0x0, 0xc000293620?, 0x1)
	runtime/select.go:327 +0x7be fp=0xc000285ef0 sp=0xc000285db0 pc=0x44767e
net/http.(*persistConn).writeLoop(0xc000098d80)
	net/http/transport.go:2410 +0xf2 fp=0xc000285fc8 sp=0xc000285ef0 pc=0x6fdfb2
net/http.(*Transport).dialConn.func6()
	net/http/transport.go:1766 +0x26 fp=0xc000285fe0 sp=0xc000285fc8 pc=0x6faa26
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000285fe8 sp=0xc000285fe0 pc=0x4672a1
created by net/http.(*Transport).dialConn
	net/http/transport.go:1766 +0x173d

goroutine 64 [IO wait]:
runtime.gopark(0xc000280cb8?, 0xb?, 0x0?, 0x0?, 0x16?)
	runtime/proc.go:381 +0xd6 fp=0xc000280c78 sp=0xc000280c58 pc=0x437dd6
runtime.netpollblock(0x4cb145?, 0x40482f?, 0x0?)
	runtime/netpoll.go:527 +0xf7 fp=0xc000280cb0 sp=0xc000280c78 pc=0x430697
internal/poll.runtime_pollWait(0x7f21e7207d18, 0x72)
	runtime/netpoll.go:306 +0x89 fp=0xc000280cd0 sp=0xc000280cb0 pc=0x461aa9
internal/poll.(*pollDesc).wait(0xc0000b7c00?, 0xc0003bf414?, 0x0)
	internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc000280cf8 sp=0xc000280cd0 pc=0x4e72f2
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0000b7c00, {0xc0003bf414, 0x4, 0x4})
	internal/poll/fd_unix.go:167 +0x299 fp=0xc000280d90 sp=0xc000280cf8 pc=0x4e86d9
net.(*netFD).Read(0xc0000b7c00, {0xc0003bf414?, 0x450106?, 0x2?})
	net/fd_posix.go:55 +0x29 fp=0xc000280dd8 sp=0xc000280d90 pc=0x5dd329
net.(*conn).Read(0xc000012540, {0xc0003bf414?, 0xc000280e88?, 0x762082?})
	net/net.go:183 +0x45 fp=0xc000280e20 sp=0xc000280dd8 pc=0x5eba05
net.(*TCPConn).Read(0xc000280ea0?, {0xc0003bf414?, 0xc000280e88?, 0x40b676?})
	<autogenerated>:1 +0x29 fp=0xc000280e50 sp=0xc000280e20 pc=0x5fe349
io.ReadAtLeast({0xbf9c60, 0xc000012540}, {0xc0003bf414, 0x4, 0x4}, 0x4)
	io/io.go:332 +0x9a fp=0xc000280e98 sp=0xc000280e50 pc=0x47277a
io.ReadFull(...)
	io/io.go:351
github.com/Mrs4s/MiraiGo/client/internal/network.(*TCPClient).ReadBytes(0xa532c0?, 0x7ebe01?)
	github.com/Mrs4s/[email protected]/client/internal/network/conn.go:66 +0x78 fp=0xc000280ef8 sp=0xc000280e98 pc=0x761858
github.com/Mrs4s/MiraiGo/client/internal/network.(*TCPClient).ReadInt32(0xc000003636?)
	github.com/Mrs4s/[email protected]/client/internal/network/conn.go:79 +0x1e fp=0xc000280f18 sp=0xc000280ef8 pc=0x7618fe
github.com/Mrs4s/MiraiGo/client.(*QQClient).netLoop(0xc000260000)
	github.com/Mrs4s/[email protected]/client/network.go:342 +0x76 fp=0xc000280fc8 sp=0xc000280f18 pc=0x7eb9f6
github.com/Mrs4s/MiraiGo/client.(*QQClient).connect.func1.5()
	github.com/Mrs4s/[email protected]/client/network.go:181 +0x26 fp=0xc000280fe0 sp=0xc000280fc8 pc=0x7ea266
runtime.goexit()
	runtime/asm_amd64.s:1598 +0x1 fp=0xc000280fe8 sp=0xc000280fe0 pc=0x4672a1
created by github.com/Mrs4s/MiraiGo/client.(*QQClient).connect.func1
	github.com/Mrs4s/[email protected]/client/network.go:181 +0x1c5

运行后生成的目录结构:
image
1.0.0版本,如果单独使用./go-cqhttp启动,是不会报错的
然后我尝试切换回v1.0.0-rc5版本,是可以正常启动的(但是无法登录会有Code 45错误,貌似在1.0.0版本该修复)

读取未加好友的私聊消息报错

每当触发未加好友的私聊消息时就会报错:
Traceback (most recent call last):
File "E:\Program Files (x86)\Microsoft Visual Studio\Shared\Python3.10.7\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "E:\Program Files (x86)\Microsoft Visual Studio\Shared\Python3.10.7\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "E:\Program Files (x86)\Microsoft Visual Studio\Shared\Python3.10.7\lib\site-packages\pycqBot\cqHttpApi.py", line 519, in run_event
self._run_event(event_name, event)
File "E:\Program Files (x86)\Microsoft Visual Studio\Shared\Python3.10.7\lib\site-packages\pycqBot\cqHttpApi.py", line 452, in _run_event
event = event.get_message(self.cqapi)
File "E:\Program Files (x86)\Microsoft Visual Studio\Shared\Python3.10.7\lib\site-packages\pycqBot\data\event.py", line 88, in get_message
return Private_Message(cqapi, self, self.data) if self.is_private() else Group_Message(cqapi, self, self.data)
File "E:\Program Files (x86)\Microsoft Visual Studio\Shared\Python3.10.7\lib\site-packages\pycqBot\data\message.py", line 89, in init
self.target_id: int = message_data["target_id"]

救命啊,搞了一天。运行后,当机器人收到消息,要根据我自定义代码处理时,总是报错

class cqHttpApi(asyncHttp):

def __init__(self, host: str="http://127.0.0.1:8000", download_path: str="./download", chunk_size: int=1024) -> None:
    super().__init__(download_path, chunk_size)
    self.http = host
    self.__reply_list_msg: dict[int, Optional[Message]] = {}
    self.thread_count = 4
    self.bot_qq = 0

这个方法默认那个参数的默认端口为8000,但如上述情况下,报错:cannot connect host 127.0.0.1:8000,远程计算机拒绝网络连接

不知道为啥每次只能用几个小时,然后就报错需要重启

Traceback (most recent call last):
File "C:\Users\joker\AppData\Local\Programs\Python\Python311\Lib\asyncio\proactor_events.py", line 792, in _loop_self_reading
f.result() # may raise
^^^^^^^^^^
File "C:\Users\joker\AppData\Local\Programs\Python\Python311\Lib\asyncio\windows_events.py", line 846, in _poll
value = callback(transferred, key, ov)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\joker\AppData\Local\Programs\Python\Python311\Lib\asyncio\windows_events.py", line 471, in finish_recv
return ov.getresult()
^^^^^^^^^^^^^^
OSError: [WinError 121] 信号灯超时时间已到

无法调用send_forward_msg函数

Error: 'Group_Message' object has no attribute 'send_forward_msg'
按照开发文档内源码
py message.send_forward_msg(message.group_id, node_list(message_list, "test", "账号" ))

间歇性假死

机器人假死,一段时间有用一段时间没用
qq输入了命令,但是日志无显示,输入啥都没反应了,假死,下面日志输出时,输入多少次都没反应,但是过一两分钟又有用了
`[2023-04-08 18:33:56,988][MainThread/DEBUG] PyCqBot: < TEXT '{"post_type":"meta_event","meta_event_type":"he...88}},"interval":5000}\n' [394 bytes]
[2023-04-08 18:33:56,992][MainThread/DEBUG] PyCqBot: go-cqhttp 上报 meta_event_heartbeat 事件: {'post_type': 'meta_event', 'meta_event_type': 'heartbeat', 'time': 1680978836, 'self_id': 169888531, 'status': {'app_enabled': True, 'app_good': True, 'app_initialized': True, 'good': True, 'online': True, 'plugins_good': None, 'stat': {'packet_received': 62, 'packet_sent': 41, 'packet_lost': 0, 'message_received': 7, 'message_sent': 7, 'disconnect_times': 0, 'lost_times': 0, 'last_message_time': 1680978688}}, 'interval': 5000}
[2023-04-08 18:33:56,994][MainThread/DEBUG] PyCqBot: websocket 心跳: {'post_type': 'meta_event', 'meta_event_type': 'heartbeat', 'time': 1680978836, 'self_id': 169888531, 'status': {'app_enabled': True, 'app_good': True, 'app_initialized': True, 'good': True, 'online': True, 'plugins_good': None, 'stat': {'packet_received': 62, 'packet_sent': 41, 'packet_lost': 0, 'message_received': 7, 'message_sent': 7, 'disconnect_times': 0, 'lost_times': 0, 'last_message_time': 1680978688}}, 'interval': 5000}
[2023-04-08 18:34:01,988][MainThread/DEBUG] PyCqBot: < TEXT '{"post_type":"meta_event","meta_event_type":"he...88}},"interval":5000}\n' [394 bytes]
[2023-04-08 18:34:01,991][MainThread/DEBUG] PyCqBot: go-cqhttp 上报 meta_event_heartbeat 事件: {'post_type': 'meta_event', 'meta_event_type': 'heartbeat', 'time': 1680978841, 'self_id': 169888531, 'status': {'app_enabled': True, 'app_good': True, 'app_initialized': True, 'good': True, 'online': True, 'plugins_good': None, 'stat': {'packet_received': 62, 'packet_sent': 41, 'packet_lost': 0, 'message_received': 7, 'message_sent': 7, 'disconnect_times': 0, 'lost_times': 0, 'last_message_time': 1680978688}}, 'interval': 5000}
[2023-04-08 18:34:01,993][MainThread/DEBUG] PyCqBot: websocket 心跳: {'post_type': 'meta_event', 'meta_event_type': 'heartbeat', 'time': 1680978841, 'self_id': 169888531, 'status': {'app_enabled': True, 'app_good': True, 'app_initialized': True, 'good': True, 'online': True, 'plugins_good': None, 'stat': {'packet_received': 62, 'packet_sent': 41, 'packet_lost': 0, 'message_received': 7, 'message_sent': 7, 'disconnect_times': 0, 'lost_times': 0, 'last_message_time': 1680978688}}, 'interval': 5000}
[2023-04-08 18:34:06,991][MainThread/DEBUG] PyCqBot: < TEXT '{"post_type":"meta_event","meta_event_type":"he...e_time":1680978688}}}\n' [394 bytes]
[2023-04-08 18:34:06,994][MainThread/DEBUG] PyCqBot: go-cqhttp 上报 meta_event_heartbeat 事件: {'post_type': 'meta_event', 'meta_event_type': 'heartbeat', 'time': 1680978846, 'self_id': 169888531, 'interval': 5000, 'status': {'app_enabled': True, 'app_good': True, 'app_initialized': True, 'good': True, 'online': True, 'plugins_good': None, 'stat': {'packet_received': 62, 'packet_sent': 41, 'packet_lost': 0, 'message_received': 7, 'message_sent': 7, 'disconnect_times': 0, 'lost_times': 0, 'last_message_time': 1680978688}}}
[2023-04-08 18:34:06,997][MainThread/DEBUG] PyCqBot: websocket 心跳: {'post_type': 'meta_event', 'meta_event_type': 'heartbeat', 'time': 1680978846, 'self_id': 169888531, 'interval': 5000, 'status': {'app_enabled': True, 'app_good': True, 'app_initialized': True, 'good': True, 'online': True, 'plugins_good': None, 'stat': {'packet_received': 62, 'packet_sent': 41, 'packet_lost': 0, 'message_received': 7, 'message_sent': 7, 'disconnect_times': 0, 'lost_times': 0, 'last_message_time': 1680978688}}}
[2023-04-08 18:34:07,382][MainThread/DEBUG] PyCqBot: % sending keepalive ping
[2023-04-08 18:34:07,384][MainThread/DEBUG] PyCqBot: > PING f0 f5 41 b8 [binary, 4 bytes]
[2023-04-08 18:34:07,389][MainThread/DEBUG] PyCqBot: < PONG f0 f5 41 b8 [binary, 4 bytes]
[2023-04-08 18:34:07,392][MainThread/DEBUG] PyCqBot: % received keepalive pong

image

`

收到“#”符号就会回复“指令 # 不存在”的问题

不知道消息能不能被看到,我在使用该程序根据b站“伪装人类”的视频建立QQ机器人的时候遇到了如下问题:

简单来说,程序在接收到“#”符号打头的内容就会自动回复“指令 # 不存在”

因为我在一个经常会用这种符号玩角色扮演的跑团群里,所以这个机制非常容易让机器人暴露或刷屏。

我没有较为深刻的计算机知识,在这方面的理解只比常人多那么一点。我翻了视频up提供程序中的好几个py文件,并且询问了ChatGPT,但都没有找到取消这个功能的办法

希望能得到一个解决方式,也希望能见谅一下我可能作为非专业人员的冒昧,也许是我个人的问题,但确实太影响使用了

好多报错

我在start()加入了自己的地址,bot.start('D:\mybot\go-cqhttp.exe'),是为了解绝不是内部命令的问题,然后运行报错:
Exception in thread cqhttp_shell:
Traceback (most recent call last):
File "C:\Users\JackyZ\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Users\JackyZ\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\JackyZ\AppData\Local\Programs\Python\Python311\Lib\site-packages\pycqBot\cqApi.py", line 810, in cqhttp_start
self._set_config(go_cqhttp_path)
File "C:\Users\JackyZ\AppData\Local\Programs\Python\Python311\Lib\site-packages\pycqBot\cqApi.py", line 801, in _set_config
with open(config_path, "w", encoding="utf8") as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'D:\mybot\go-cqhttp.exe\./config.yml'

消息不反应

[2023-05-25 00:38:17,595][go-cqhttp/DEBUG] PyCqBot: Protocol -> rev pkt: MessageSvc.PushNotify seq: -347099374
[2023-05-25 00:38:17,686][go-cqhttp/DEBUG] PyCqBot: Protocol -> rev pkt: MessageSvc.PbGetMsg seq: 13905
[2023-05-25 00:38:17,726][go-cqhttp/DEBUG] PyCqBot: Protocol -> rev pkt: MessageSvc.PbDeleteMsg seq: 13906
不管发什么都是这个

[2023-05-25 00:31:40,973][go-cqhttp/DEBUG] PyCqBot: Protocol -> rev pkt: OnlinePush.PbPushGroupMsg seq: -1462599507
[CQ:image,file=95bc4951eb881ac609b0d037cb7d9855.image,subType=0,url=https://gchat.qpic.cn/gchatpic_new/2564230889/721379259-2809372450-95BC4951EB881AC609B0D037CB7D9855/0?term=2&is_origin=0]
https://t.bilibili.com/799325557570404393 (1826991480)
只会对cq产生反应

pip install pycqBot后找不到对应的import

我找到一个b站up主弄的qq机器人的代码,其中
from pycqBot.cqApi import cqHttpApi, cqLog #这个
from pycqBot import Message, cqCode #这个
import pandas as pd
import random
import logging
import chat
import time
import json
from datetime import datetime
import re
import os

在我安装pycqBot后找不到,'cqHttpApi' from 'pycqBot.cqApi'和message
Traceback (most recent call last):
File "E:\qqBotPlus\Spit_chatBot\qqbot.py", line 11, in
from pycqBot.cqApi import cqHttpApi, cqLog
ImportError: cannot import name 'cqHttpApi' from 'pycqBot.cqApi' (D:\python3.11\Lib\site-packages\pycqBot\cqApi.py)
ImportError: cannot import name 'Message' from 'pycqBot' (D:\python3.11\Lib\site-packages\pycqBot_init_.py)
版本是
PS E:\qqBotPlus\Spit_chatBot> pip show pycqBot
Name: pycqBot
Version: 0.5.1.1
Summary: go-cqhttp python 框架,可以用于快速塔建 bot
Home-page: https://github.com/FengLiuFeseliud/pycqBot
Author: FengLiuFeseliud
Author-email: [email protected]
License: AGPL-3.0 License
Location: D:\python3.11\Lib\site-packages
Requires: aiofiles, aiohttp, asyncio, lxml, pyyaml, requests, websockets
Required-by:
PS E:\qqBotPlus\Spit_chatBot>这个跟python版本有问题吗?因为作者是用的3.9做的机器人

成员函数 message.reply貌似无法正常工作

如图,我通过一个自定义函数来检测违规词汇,当检测到违规词汇的时候发出提醒。
QQ20240127-235255
但是经过实验,发现当输入违规词汇后,message.reply并不能成功地发送信息,而是返回了这样一串错误
QQ20240127-235540
看错误貌似是和go-cqhttp后端有关,但是让我感到好奇的是为什么go-cqhttp明明在开发文档中写着的send_msg接口返回的是json,但在这返回的竟然是text-plain.
这是我的websocket代理配置信息:
QQ20240127-235833
还有,我在运行的时候看到cqhttp报了这么一串信息,是不是跟这个有关?
QQ20240127-235913

如何删除help和status这两个命令

我想设置help格式,但是我试了好多遍都不知道咋办,我是想删除help和status这两个命令,或者说让他们不起作用,有哪位大佬给个解决方案

cannot import name 'cqBot' from 'pycqBot.cqApi'

用的Anaconda,python版本3.9.13,pycqbot版本0.5.1.1 go-cqhttp版本1.0.1.按照教程的模板编写了main.py和myPlugin.py后加载插件失败提示cannot import name 'cqBot' from 'pycqBot.cqApi'。
以下为main.py和myPlugin.py的内容
from pycqBot import cqHttpApi, cqLog
cqLog()

cqapi = cqHttpApi()
bot = cqapi.create_bot()

bot.plugin_load(["myPlugin"])

bot.start(print_error=False)

myPlugin.py

from pycqBot.cqApi import cqBot, cqHttpApi
from pycqBot.object import Plugin
from pycqBot.data import *

class myPlugin(Plugin):

def __init__(self, bot: cqBot, cqapi: cqHttpApi, plugin_config):
    super().__init__(bot, cqapi, plugin_config)

    bot.command(self.test_plugin, "test", {
        "type": "all"
    })

def test_plugin(self, cdata, message: Message):
    message.reply("this 插件 myPlugin")

以下是运行bot.plugin_load(["myPlugin"])这行时的报错:
[2023-05-11 21:37:08,353][MainThread/ERROR] PyCqBot: 加载插件 myPlugin 时发生错误: cannot import name 'cqBot' from 'pycqBot.cqApi' (D:\anaconda3\lib\site-packages\pycqBot\cqApi.py)
[2023-05-11 21:37:08,354][MainThread/ERROR] PyCqBot: cannot import name 'cqBot' from 'pycqBot.cqApi' (D:\anaconda3\lib\site-packages\pycqBot\cqApi.py)
Traceback (most recent call last):
File "D:\anaconda3\lib\site-packages\pycqBot\cqHttpApi.py", line 429, in import_plugin
plugin_obj = importlib.import_module(f"plugin.{plugin}.{plugin}")
File "D:\anaconda3\lib\importlib_init
.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "E:\go-cqhttp\plugin\myPlugin.py", line 1, in
from pycqBot.cqApi import cqBot, cqHttpApi
ImportError: cannot import name 'cqBot' from 'pycqBot.cqApi' (D:\anaconda3\lib\site-packages\pycqBot\cqApi.py)
[2023-05-11 21:37:08,357][MainThread/INFO] PyCqBot: 加载插件: ['myPlugin']

连接ws成功后,接收消息报错

报错内容:

[2023-05-13 10:54:11,903][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 Protocol -> device lock is disable. http api may fail.
[2023-05-13 10:54:27,358][MainThread/INFO] PyCqBot: 正在连接 go-cqhttp websocket 服务
[2023-05-13 10:54:27,373][run_meta_event_lifecycle_connect_0/INFO] PyCqBot: 成功连接 websocket 服务! bot qq:*****
[2023-05-13 10:54:31,821][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 警告: 长消息响应延迟为 2932ms, 大于 1000ms, 可能导致无法接收/发送长消息的情况, 请检查本地网络状态.
首次启动,获取历史信息中...
???
[2023-05-13 10:54:34,924][go-cqhttp/WARNING] PyCqBot: go-cqhttp 警告 处理 WebSocket 请求时出现错误: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
[2023-05-13 10:54:34,924][asyncHttp_loop/ERROR] PyCqBot: api 请求发生错误 Error: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('http://127.0.0.1:8080/get_group_msg_history')
[2023-05-13 10:54:34,924][asyncHttp_loop/ERROR] PyCqBot: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('http://127.0.0.1:8080/get_group_msg_history')
Traceback (most recent call last):
File "C:\Users\huawei\AppData\Local\Programs\Python\Python311\Lib\site-packages\pycqBot\asyncHttp.py", line 77, in link
http_data = await req.json(encoding=encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\huawei\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client_reqrep.py", line 1104, in json
raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('http://127.0.0.1:8080/get_group_msg_history')
[2023-05-13 10:54:34,926][asyncHttp_loop/WARNING] PyCqBot: cqAPI 响应: None / {}

使用手机QQ发送视频时会被识别为指令处理并产生Error: list index out of range

image
image

如图,经过分析我发现发送信息后pycqbot会优先处理信息是否包含指令

而尝试读取一条使用手机发送的视频信息时,由于该信息不包含文本,同时程序尝试强制访问该信息的文本内容而产生错误

经测试,该bug会在发送视频时100%触发,但使用电脑端以文件的方法发送视频不会触发

(幸好不会直接崩)

(顺带说一下能不能隐藏不存在的指令的回复信息)
image
pycqBot v0.4.5.1

echo指令无法回复信息

复制了文档里的代码,能够接受群聊信息,能够接受并回复#help指令,能够接受echo指令,但是不会回复。使用#help后,回复会有#echo-输出文本。
日志中只能接受并回复#help指令,echo指令只能接受到发送的信息。
日志稍后提供

自定义host不成功

from pycqBot import cqHttpApi, cqLog

启用日志 默认日志等级 DEBUG

cqLog()
cqapi = cqHttpApi()
bot = cqapi.create_bot(
host='192.168.3.154'
)
bot.start()

按照文档扣了一下示例程序,我想指定host 结果不行,它总是提示'.\go-cqhttp.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。这改怎么办,192.168.3.154已经开启了正向WS http

事件无法正常处理(?

不知道是否我写错了什么,代码如下

def notice_group_upload(message: Message):
    print(2)


bot = cqapi.create_bot(
    options={
        ....(省略)
    },
)

bot.notice_group_upload = notice_group_upload
bot.start

on_group_msg这个event可以正常响应,其他的却都没有任何反应,试了好几个其他event皆如此

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.