-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法初始化efb,Specified client not found #105
Comments
Mirai 有安装 Mirai-api-http 吗?如果有,监听在了哪个端口,可以用 |
配置文件
## 启用的 adapter, 请确保 http 和 ws 列在下方
adapters:
- http
- ws
## 是否开启认证流程, 若为 true 则建立连接时需要验证 verifyKey
## 强烈建议开启
enableVerify: true
verifyKey: ***@***.***
## 开启一些调式信息
debug: false
## 是否开启单 session 模式, 若为 true,则自动创建 session 绑定 console 中登录的 bot
## 开启后,接口中任何 sessionKey 不需要传递参数
## 若 console 中有多个 bot 登录,则行为未定义
## 确保 console 中只有一个 bot 登陆时启用
## 这里可以留为 false
singleMode: false
## 历史消息的缓存大小
## 同时,也是 http adapter 的消息队列容量
cacheSize: 4096
## adapter 的单独配置,键名与 adapters 项配置相同
adapterSettings:
## 详情看 http adapter 使用说明 配置
http:
host: 127.0.0.1
port: 8080
cors: [*]
## 详情看 websocket adapter 使用说明 配置
ws:
host: 127.0.0.1
port: 8080
reservedSyncId: -1
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2022年2月9日(星期三) 晚上8:13
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [ehForwarderBot/efb-qq-slave] 无法初始化efb,Specified client not found (Issue #105)
Mirai 有安装 Mirai-api-http 吗?如果有,监听在了哪个端口,可以用 netstat -lntp 看下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
补充
…------------------ 原始邮件 ------------------
发件人: "ehForwarderBot/efb-qq-slave" ***@***.***>;
发送时间: 2022年2月9日(星期三) 晚上8:13
***@***.***>;
***@***.******@***.***>;
主题: Re: [ehForwarderBot/efb-qq-slave] 无法初始化efb,Specified client not found (Issue #105)
Mirai 有安装 Mirai-api-http 吗?如果有,监听在了哪个端口,可以用 netstat -lntp 看下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
和楼上一模一样的日志和情况。 |
遇到了同样的问题。使用netstat -lntp查看到 During handling of the above exception, another exception occurred: Traceback (most recent call last): |
已经找到问题,退回python3.8环境就正常了。3.10环境下 |
Now when loading the corresponding clients, it uses a `try-except` to make sure that the specified client in the configuration file has been installed by the user. However, there are some tricky things. The code uses `c.load()` to load a distribution. However, the `c.load()` itself may fail which causes exception "Specified client not found". Although users have already installed some specified client, `c.load()` could fail in the following situations: + The explicit dependency error (the client dependency doesn't require). + The implicit dependency (it is more tricky to deal). However, the code just provides exception "Specified client not found" which is not clear for users. That's why there are many issues which talks about this exception (ehForwarderBot#105 ehForwarderBot#113 ehForwarderBot#102) So this patch aims at providing more robust error handling which could make users understand what really happens to make the users life easier.
同样是这个问题 只不过客户端GoCQHttp python版本3.8 配置文件如下
|
root@1092536304hax:~# ehforwarderbot
2022-02-08 02:54:09,982 [Level 99]: ehforwarderbot.main (main.init; main.py:129)
Initializing slave milkice.qq...
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
raise exceptions[0]
File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
sock = await self._connect_sock(
File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
return await fut
File "/usr/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 8080)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/mirai_core/network.py", line 98, in post
response = await self.session.post(self.base_url + url, headers=headers, json=data)
File "/usr/local/lib/python3.9/dist-packages/aiohttp/client.py", line 520, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 1051, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 975, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8080 ssl:default [Connect call failed ('127.0.0.1', 8080)]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/efb_qq_slave/ClientMgr.py", line 27, in init
self.client = cls(name, config, channel)
File "/usr/local/lib/python3.9/dist-packages/efb_qq_plugin_mirai/mirai.py", line 66, in init
self.loop.run_until_complete(self.bot.handshake())
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/local/lib/python3.9/dist-packages/mirai_core/bot.py", line 58, in handshake
await self.verify()
File "/usr/local/lib/python3.9/dist-packages/mirai_core/bot.py", line 65, in verify
result = await self.session.post('/verify', data={'verifyKey': self.verify_key})
File "/usr/local/lib/python3.9/dist-packages/mirai_core/network.py", line 100, in post
raise NetworkException('Unable to reach Mirai console')
mirai_core.exceptions.NetworkException: Unable to reach Mirai console
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/ehforwarderbot", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/ehforwarderbot/main.py", line 335, in main
init(conf)
File "/usr/local/lib/python3.9/dist-packages/ehforwarderbot/main.py", line 135, in init
coordinator.add_channel(cls(instance_id=instance_id))
File "/usr/local/lib/python3.9/dist-packages/efb_qq_slave/init.py", line 44, in init
self.init_client_manager()
File "/usr/local/lib/python3.9/dist-packages/efb_qq_slave/init.py", line 73, in init_client_manager
self.QQClientMgr = ClientMgr(self.config['Client'], self.config, self)
File "/usr/local/lib/python3.9/dist-packages/efb_qq_slave/ClientMgr.py", line 30, in init
raise Exception("Specified client not found!")
Exception: Specified client not found!
issues所有方法都试了一遍,还是这样。。
The text was updated successfully, but these errors were encountered: