Closed TkzcM closed 5 years ago
这是一个已知的问题 实际上 EQS 所得到的图片并非来自于 cqimg 文件,而是 coolq-http-plugin 在上报给 EQS 的消息内容中会包含图片地址(在腾讯服务器上) 每次 EQS 都会先从这个地址下载图片到本地后再上传到 Telegram 所以当运行 EFB 的机器与腾讯服务器联通不畅之时便会出现 Download Failed 的情况,目前没有失败重试机制所以下载失败即报错,应该属于偶发性错误,如果每张图片都接收不到的话请看看有没有后台日志可以提供
确实是每张图片都接收不到 尝试给 EFB 换了一个网络环境也不行 Log 只有下面这一句
2018-12-22 21:26:29,898-WARNING-Image download failed.
2018-12-22 21:26:30,403-WARNING-Image download failed.
2018-12-22 21:26:30,403-WARNING-Image download failed.
2018-12-22 21:26:30,403-WARNING-Image download failed.
2018-12-22 21:26:30,403-WARNING-Image download failed.
2018-12-22 21:26:30,403-WARNING-Image download failed.
2018-12-22 21:26:30,403-WARNING-Image download failed.
2018-12-22 21:27:06,208-WARNING-Image download failed.
2018-12-22 21:27:06,208-WARNING-Image download failed.
2018-12-22 21:27:06,208-WARNING-Image download failed.
2018-12-22 21:27:06,208-WARNING-Image download failed.
2018-12-22 21:27:06,208-WARNING-Image download failed.
2018-12-22 21:27:06,208-WARNING-Image download failed.
@TkzcM 这还真是奇怪呢…没有遇到过这种情况 就算开了verbose模式 也只有这点日志吗
开了verbose之后的日志
2018-12-24 12:35:52,842 [DEBUG]: efb_qq_slave.Clients.CoolQ.CoolQ (CoolQ.handle_msg; CoolQ.py:63)
{'anonymous': None, 'font': 29381760, 'group_id': 498013321, 'message': [{'data': {'file': '78706B2372E08A8A37637982348169F2.jpg', 'url': 'https://gchat.qpic.cn/gchatpic_new/462333321/3988013321-2825474064-78706B2372E08A8A37637982348169F2/0?vuin=&term=2'}, 'type': 'image'}], 'message_id': 22210, 'message_type': 'group', 'post_type': 'message', 'raw_message': '[CQ:image,file=78706B2372E08A8A37637982348169F2.jpg]', 'self_id': ********, 'sender': {'age': 22, 'area': '伊朗', 'card': 'pinkun', 'level': '传说', 'nickname': 'Diggers', 'role': 'member', 'sex': 'male', 'title': '', 'user_id': 462333321}, 'sub_type': 'normal', 'time': 1545626152, 'user_id': 462333321}
2018-12-24 12:35:53,261 [WARNING]: efb_qq_slave.Clients.CoolQ.Utils (Utils.cq_get_image; Utils.py:159)
Image download failed.
2018-12-24 12:35:53,297 [DEBUG]: efb_telegram_master.slave_message (slave_message.send_message; slave_message.py:52)
[bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0] Slave message delivered to ETM.
<EFBMsg, <EFBChat: Diggers (pinkun, private_462333321) @ QQ Slave>@<EFBChat: 爆仓疗养院 (group_498013321) @ QQ Slave> [Text]: [Download image failed, please check on your QQ client]; bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0>
2018-12-24 12:35:53,298 [INFO]: werkzeug (_internal._log; _internal.py:88)
127.0.0.1 - - [24/Dec/2018 12:35:53] "POST / HTTP/1.1" 200 -
2018-12-24 12:35:53,299 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2699)
('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS "t1" WHERE ("t1"."slave_uid" = ?)', ['milkice.qq group_498013321'])
2018-12-24 12:35:53,303 [DEBUG]: efb_telegram_master.slave_message (slave_message.send_message; slave_message.py:59)
[bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0] The message should deliver to blueset.telegram -1001283590049
2018-12-24 12:35:53,304 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2699)
('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS "t1" WHERE ("t1"."master_uid" = ?)', ['blueset.telegram -1001283590049'])
2018-12-24 12:35:53,304 [DEBUG]: efb_telegram_master.slave_message (slave_message.send_message; slave_message.py:73)
[bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0] Message is in chat <EFBChat: 爆仓疗养院 (group_498013321) @ QQ Slave>
2018-12-24 12:35:53,304 [DEBUG]: efb_telegram_master.slave_message (slave_message.generate_message_template; slave_message.py:511)
[bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0] Message is from a group. Sender: <EFBChat: Diggers (pinkun, private_462333321) @ QQ Slave>
2018-12-24 12:35:53,305 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2699)
('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS "t1" WHERE ("t1"."slave_uid" = ?)', ['milkice.qq private_462333321'])
2018-12-24 12:35:53,305 [DEBUG]: efb_telegram_master.slave_message (slave_message.send_message; slave_message.py:83)
[bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0] Message is sent to Telegram chat -1001283590049, with header "pinkun (Diggers):".
2018-12-24 12:35:53,305 [DEBUG]: efb_telegram_master.slave_message (slave_message.slave_message_text; slave_message.py:196)
[bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0] Sending as a text message.
2018-12-24 12:35:53,991 [DEBUG]: efb_telegram_master.slave_message (slave_message.slave_message_text; slave_message.py:285)
[bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0] Processed and sent as text message
2018-12-24 12:35:53,992 [DEBUG]: efb_telegram_master.slave_message (slave_message.send_message; slave_message.py:159)
[bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0] Message is sent to the user.
2018-12-24 12:35:53,994 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2699)
('INSERT INTO "msglog" ("master_msg_id", "slave_message_id", "text", "slave_origin_uid", "slave_origin_display_name", "slave_member_uid", "slave_member_display_name", "msg_type", "sent_to", "time") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ['-1001283590049.1907', 'bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0', '[Download image failed, please check on your QQ client]', 'milkice.qq group_498013321', None, 'private_462333321', 'pinkun', 'MsgType.Text', 'slave', datetime.datetime(2018, 12, 24, 12, 35, 53, 993000)])
2018-12-24 12:35:53,998 [DEBUG]: efb_telegram_master.slave_message (slave_message.send_message; slave_message.py:173)
[bd1bd6a1-7e21-425e-b626-cb0ab6821394_22210_0] Message inserted/updated to the database.
当时是我偷懒只输出了异常没有输出具体错误… 下一个版本将会改进 请更新到新版之后再将日志反馈过来
看起来是我 Python SSL 模块的问题 :(
2019-01-01 20:03:06,709 [WARNING]: efb_qq_slave.Clients.CoolQ.Utils (Utils.cq_get_image; Utils.py:157)
Image download failed.
2019-01-01 20:03:06,709 [WARNING]: efb_qq_slave.Clients.CoolQ.Utils (Utils.cq_get_image; Utils.py:158)
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051)>
容器内 /coolq/data/image/ 中有 cqimg 文件,但 Telegram 端图片消息显示 [Download image failed, please check on your QQ client] 。
系统 Debian 8
CoolQ 配置 docker run -ti --rm --name cqhttp-test --net="host" \ -v $(pwd)/coolq:/root/coolq
# mount coolq folder
\ -p 9000:9000# 网页noVNC端口
\ -p 5700:5700# 酷Q对外提供的API接口的端口
\ -e VNC_PASSWD=****# 请修改 VNC 密码!!!!
\ -e COOLQ_PORT=5700# 酷Q对外提供的API接口的端口
\ -e COOLQ_ACCOUNT=****# 在此输入要登录的QQ号,虽然可选但是建议填入
\ -e CQHTTP_POST_URL=http://127.0.0.1:8000# efb-qq-slave监听的端口/地址 用于接受传入的消息
\ -e CQHTTP_SERVE_DATA_FILES=yes# 允许以HTTP方式访问酷Q数据文件
\ -e CQHTTP_ACCESS_TOKEN=ac0f790e1fb74ebcaf45da77a6f9de47# Access Token
\ -e CQHTTP_POST_MESSAGE_FORMAT=array# 回传消息时使用数组(必选)
\ richardchien/cqhttp:latestEFB配置 Client: CoolQ
CoolQ: type: HTTP
access_token: ac0f790e1fb74ebcaf45da77a6f9de47 api_root: http://127.0.0.1:5700/ host: 127.0.0.1
port: 8000
is_pro: false
air_option:
upload_to_smms: true