嘟嘟社区

[疑问] python3 nchnroutes 跑着出错 请问哪里的问题??


https://github.com/dndx/nchnroutes

[root@localhost nchnroutes-main]# make
git pull
fatal: Not a git repository (or any of the parent directories): .git
make: *** [produce] Error 128
[[email protected] nchnroutes-main]#

[[email protected] nchnroutes-main]# python3 produce.py
Traceback (most recent call last):
  File "produce.py", line 109, in <module>
    subtract_cidr(root, (a,))
  File "produce.py", line 81, in subtract_cidr
    if n.cidr.supernet_of(cidr_to_sub):
AttributeError: ‘IPv4Network’ object has no attribute ‘supernet_of’
[[email protected] nchnroutes-main]#

想获取非国内V4 V6地址

应该是库的版本不对吧

keygen8 发表于 2022-3-15 17:22
应该是库的版本不对吧

刚才又新建了个VPS试了一次,也是错误的。
作者代码有问题

Installed:
  python3.x86_64 0:3.6.8-18.el7                                                                     

Dependency Installed:
  python3-libs.x86_64 0:3.6.8-18.el7                    python3-pip.noarch 0:9.0.3-8.el7            
  python3-setuptools.noarch 0:39.2.0-10.el7            

Complete!
[[email protected] nchnroutes]# make
git pull
Already up-to-date.
curl -o delegated-apnic-latest https://ftp.apnic.net/stats/apnic/delegated-apnic-latest
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3478k  100 3478k    0     0   747k      0  0:00:04  0:00:04 –:–:–  824k
curl -o china_ip_list.txt https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 95267  100 95267    0     0   759k      0 –:–:– –:–:– –:–:–  762k
python3 produce.py
Traceback (most recent call last):
  File "produce.py", line 109, in <module>
    subtract_cidr(root, (a,))
  File "produce.py", line 81, in subtract_cidr
    if n.cidr.supernet_of(cidr_to_sub):
AttributeError: ‘IPv4Network’ object has no attribute ‘supernet_of’
make: *** [produce] Error 1
[[email protected] nchnroutes]#

KDE 发表于 2022-3-15 17:39
刚才又新建了个VPS试了一次,也是错误的。
作者代码有问题

应该是你的python3版本太低,换个高点的试试