MJL85 / natlas

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

init error #1

Closed loganbest closed 9 years ago

loganbest commented 9 years ago

I'm running Python 2.7.10.

 $ ./mnet-graph.py -r x.x.x.x -f gscnetwork.svg -d 10 -c ./mnet.conf
MNet-Graph v0.1
Written by Michael Laforest <mjlaforest@gmail.com>

Config file: ./mnet.conf
  Root node: x.x.x.x
Output file: gscnetwork.svg
Crawl depth: 10
Diagram title: MNet Network Diagram

Traceback (most recent call last):
  File "./mnet-graph.py", line 666, in <module>
    main(sys.argv[1:])
  File "./mnet-graph.py", line 487, in main
    crawl_node(opt_root_ip, opt_depth)
  File "./mnet-graph.py", line 256, in crawl_node
    system_name = shorten_host_name(get_snmp_val(ip, OID_SYSNAME) or 'UNKNOWN')
  File "./mnet-graph.py", line 109, in get_snmp_val
    cmdgen.CommunityData(community),
TypeError: __init__() takes at least 3 arguments (2 given)
MJL85 commented 9 years ago

What version of PySNMP are you using? I believe you can check it with the below. I've tested it with 4.2.5.

michael# python2
Python 2.7.8 (default, Dec  4 2014, 15:36:21)
[GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] on freebsd10
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysnmp
>>> print pysnmp.__version__
4.2.5
>>> quit()
loganbest commented 9 years ago

4.2.1

loganbest commented 9 years ago

Any luck with this?

NINJA EDIT: This is particularly erroring on OSX 10.7.5, but I get the same on 10.10 as well

liftedkilt commented 9 years ago

Just for kicks - did you update to the new version of the script? You'll need to install netaddr for python as well (easy_install netaddr)

On Wed, Jul 8, 2015, 11:01 PM Logan Best notifications@github.com wrote:

Any luck with this?

— Reply to this email directly or view it on GitHub https://github.com/MJL85/mnet/issues/1#issuecomment-119829811.

MJL85 commented 9 years ago

Added package to pip which should hopefully fix this issue. If it doesn't please open a new ticket. Closing because there have been so many revisions in the past week I doubt this is still relevant.