etingof / pysnmp

Python SNMP library
http://snmplabs.com/pysnmp/
BSD 2-Clause "Simplified" License
576 stars 198 forks source link

;NameError: global name 'SmiError' is not defined #115

Closed ghost closed 6 years ago

ghost commented 6 years ago

http://snmplabs.com/pysnmp/examples/hlapi/asyncore/sync/manager/cmdgen/mib-tweaks.html i read the document, but exec the 'Preload PySNMP MIBs' scripts,error

File "/venv27/lib/python2.7/site-packages/pysnmp/proto/rfc1155.py", line 96, in cloneFromName raise SmiError('unknown NetworkAddress type %r' % (kind,)) NameError: global name 'SmiError' is not defined So I added one to the scripts from pysnmp.smi.error import SmiError Problem solved

etingof commented 6 years ago

Fixed in 91b30573c997f08d3e8ba8c471248a4434d59564. Thank you!