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

报错了 #155

Open
l5768622 opened this issue Aug 6, 2024 · 1 comment
Open

报错了 #155

l5768622 opened this issue Aug 6, 2024 · 1 comment

Comments

@l5768622
Copy link

l5768622 commented Aug 6, 2024

ERROR: CHANGE OPTIMIZATION IP ERROR: ----Time: 2024-08-06 11:22:53----MESSAGE: HTTPSConnectionPool(host='api.hostmonit.com', port=443): Max retries exceeded with url: /get_optimization_ip (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)')))
Traceback (most recent call last):
File "/root/cf2dns.py", line 126, in main
log_cf2dns.logger.error("GET CLOUDFLARE IP ERROR: ----Time: " + str(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())) + "----MESSAGE: " + str(cfips["info"]))
TypeError: 'NoneType' object is not subscriptable
2024-08-06 11:22:53,770 - /root/cf2dns.py[line:184] - ERROR: CHANGE DNS ERROR: ----Time: 2024-08-06 11:22:53----MESSAGE: 'NoneType' object is not subscriptable

@Toserk1024
Copy link

这报错不很明显吗,证书验证的问题
直接把你脚本第54行替换成

response = requests.post('https://api.hostmonit.com/get_optimization_ip', json=data, headers=headers, verify=False)

即可禁用证书校验
(临时解决方案,能用就行)
替换时需要注意缩进

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

2 participants