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

ip倒是解析成功了,但是py报错,大佬帮忙看看这是什么意思? #26

Open
xixihucxixi opened this issue Sep 24, 2024 · 4 comments

Comments

@xixihucxixi
Copy link

Traceback (most recent call last):
File "dnscf.py", line 101, in
main()
File "dnscf.py", line 95, in main
dns = update_dns_record(dns_records[index], CF_DNS_NAME, ip_address)
IndexError: list index out of range
Error: Process completed with exit code 1.

@JustinHuber
Copy link

dns_records只有一个,数组越界了,我也没搞明白作者在CF上设置一个最优IP有啥用,我自己改了下dns_records[0]

@iambonboncat
Copy link

dns_records只有一个,数组越界了,我也没搞明白作者在CF上设置一个最优IP有啥用,我自己改了下dns_records[0]

返回的ip应该是两个,但cf_dns_name的值只能填一个。

@iambonboncat
Copy link

dns_records只有一个,数组越界了,我也没搞明白作者在CF上设置一个最优IP有啥用,我自己改了下dns_records[0]

用这个代码就不报错了,挺好的。

@iambonboncat
Copy link

返回的ip应该是两个,但cf_dns_name的值只能填一个。

返回的ip应该是两个,但cf_dns_name的值只能填一个。所以能跟新第一个记录,第二个就会报错,另外,代码里面好像是不会新增记录的,需要现在自己在cf上新增一个记录,它才会自动修改。

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