MJL85 / natlas

natlas - Network Discovery and Auto-Diagramming
GNU General Public License v2.0
514 stars 111 forks source link

AttributeError: 'str' object has no attribute 'version' #4

Closed ruffedgrouse closed 9 years ago

ruffedgrouse commented 9 years ago

ruffedgrouse@mint-linux-vm ~/Documents/mnet-master $ sudo ./mnet-graph.py -r x.x.x.x -d 20 -f Network.svg -t "NETWORK DIAGRAM" MNet-Graph v0.3 Written by Michael Laforest mjlaforest@gmail.com

Config file: ./mnet.conf Root node: x.x.x.x Output file: Network.svg Crawl depth: 20 Diagram title: NETWORK DIAGRAM Out Catalog file: None

Traceback (most recent call last): File "./mnet-graph.py", line 763, in main(sys.argv[1:]) File "./mnet-graph.py", line 559, in main crawl_node(opt_root_ip, opt_depth) File "./mnet-graph.py", line 277, in crawl_node if (is_node_allowed(ip) == 0): File "./mnet-graph.py", line 425, in is_node_allowed if (ip in IPNetwork(e)): File "/usr/lib/python2.7/dist-packages/netaddr/ip/init.py", line 720, in contains if self.version != other.version: AttributeError: 'str' object has no attribute 'version'

MJL85 commented 9 years ago

Can you try v0.4? It looks like you are having trouble with PyNetAddr. You can try changing line 45 from USE_NETADDR = 1 to USE_NETADDR = 0 to remove PyNetAddr as a dependency. The replacement code that will be used when you do that can only process IPv4 though.

ruffedgrouse commented 9 years ago

I ended updating netaddr to 0.7.15 and that resolved the issue.