Skip to content
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

签到能够正常完成但每次都有报错 #17

Open
margin-bqk opened this issue Dec 3, 2022 · 2 comments
Open

签到能够正常完成但每次都有报错 #17

margin-bqk opened this issue Dec 3, 2022 · 2 comments

Comments

@margin-bqk
Copy link

Traceback (most recent call last): File "/home/runner/work/TieBaSign/TieBaSign/main.py", line 232, in <module> main() File "/home/runner/work/TieBaSign/TieBaSign/main.py", line 227, in main send_email(favorites) File "/home/runner/work/TieBaSign/TieBaSign/main.py", line 209, in send_email smtp.connect(HOST) File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/smtplib.py", line 341, in connect self.sock = self._get_socket(host, port, self.timeout) File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/smtplib.py", line 312, in _get_socket return socket.create_connection((host, port), timeout, File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/socket.py", line 824, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known Error: Process completed with exit code 1.

虽然签到都能够正常完成,但每次签到的时候都会有如此报错,请问应该如何解决呢?

@RgazHTale
Copy link

把227行代码注释掉就可以了,那个应该是用来发送通知到邮箱的

@tjsky
Copy link

tjsky commented Jan 5, 2023

因为你启用了签到结果邮件通知,看代码,还需要添加以下库秘密变量(Repository secrets)才能正常运行。
不过我没试过啊,我也是直接注释了227行,取消发送签到结果邮件。

Name Secret 备注
FROM 发信邮箱地址
TO 收信邮箱地址
HOST 发信邮箱SMTP服务器地址
AUTH 发信邮箱SMTP登录密码/秘钥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants