EstrellaXD / Auto_Bangumi

AutoBangumi - 全自动追番工具
https://autobangumi.org
MIT License
6.95k stars 361 forks source link

[错误报告] 通知推送器Wecom无法正常运行 #889

Open ui-beam-9 opened 3 hours ago

ui-beam-9 commented 3 hours ago

确认

当前程序版本

3.1.18

问题类型

程序运行问题

问题描述

在通知配置了wecom推送器,token填入了wecomchan服务端的sendkey,chat id填入的服务端的地址,通过日志查看程序在尝试发送时,出现了网络无法连接的错误,已确认容器和宿主网络没问题,在容器内使用curl运行发送命令也是可以正常发送的, wecomchan服务端也运行的docs指定的版本,自己搭建了一个测试代码,也是可以正常发送图文到企业微信创建的应用程序上的 image

发生问题时系统日志

2024-11-15 05:39:59] WARNING:  [Network] Cannot connect to https://api.ui-beam.com/wecomchan. Wait for 5 seconds.
[2024-11-15 05:40:04] WARNING:  [Network] Cannot connect to https://api.ui-beam.com/wecomchan. Wait for 5 seconds.
[2024-11-15 05:40:09] WARNING:  [Network] Cannot connect to https://api.ui-beam.com/wecomchan. Wait for 5 seconds.
[2024-11-15 05:40:09] ERROR     [Network] Failed connecting to https://api.ui-beam.com/wecomchan
[2024-11-15 05:40:09] WARNING:  [Network] Please check DNS/Connection settings
[2024-11-15 05:40:09] WARNING:  Failed to send notification: 'NoneType' object has no attribute 'status_code'
[2024-11-15 05:40:11] WARNING:  [Network] Cannot connect to https://api.ui-beam.com/wecomchan. Wait for 5 seconds.
ui-beam-9 commented 3 hours ago

附上测试代码,可以做个参考,也可以直接把该方法用于修复发送问题 autobangumi-wecom-test image image