job/aggregate6

Fails to parse ASCII strings (expects unicode)

Closed this issue · 2 comments

$ echo 2620:0:1c00::/40 | aggregate6
Traceback (most recent call last):
File "/usr/local/bin/aggregate6", line 9, in
load_entry_point('aggregate6==0.7', 'console_scripts', 'aggregate6')()
File "/usr/local/lib/python2.7/dist-packages/aggregate6/cli.py", line 107, in main
prefix_obj = ip_network(prefix)
File "/usr/lib/python2.7/dist-packages/ipaddress.py", line 199, in ip_network
' a unicode object?' % address)
ipaddress.AddressValueError: '3236:3230:3a30:3a31:6330:303a:3a2f:3430/128' does not appear to be an IPv4 or IPv6 network. Did you pass in a bytes (str in Python 2) instead of a unicode object?

Strange; using the example in the README it fails too:

$ echo -e "2001:67c:208c::/48\n2000::/3" | aggregate6
ERROR: '2001:67c:208c::/48' is not a valid IPv6 network, ignoring.
ERROR: '2000::/3' is not a valid IPv6 network, ignoring.

This is on Ubuntu 16.04 and it built with and appears to be using Python 2.7.

job commented

2.7 should be avoid, updated the docs to use pip3 in 5ff3cac - this works for me on Debian 8