-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
functional degradation #11
Comments
I need to look a bit more why the error was silently suppressed in 0.6.4 but the behaviour in 0.8.0 seems correct. Since you get an exception, you never have a change to affect the result to result=[]
try:
for idx in m.bgpPeerIdentifier:
result.append((str(idx), str(m.bgpPeerIdentifier[idx])))
except SNMPException as err:
print(err)
return dict(result) BTW, if you try |
Thanks for your answer.
|
Could you remove the "print(err)" and copy/paste the exception you get? |
I'm not quite sure which of the variants... m = M(ip, community, 2)
result = []
for idx in m.bgpPeerIdentifier:
result.append((str(idx), {'value': str(m.bgpPeerIdentifier[idx])}))
return dict(result) for snimpy==0.8.0:
|
Could you try: m = M(ip, community, 2)
m._session.bulk = False
result = []
for idx in ... It seems we get the error because of the use of GETBULK for |
m = M(ip, community, 1)
m._session.bulk = False
result = []
for idx in m.bgpPeerIdentifier:
result.append((str(idx), {'value': str(m.bgpPeerIdentifier[idx])}))
return dict(result)
|
Do not worry if nothing happened. All other libraries (netsnmp, pysnmp) do not deal with this problem. I now use |
OK, I need to test that on my side. I keep you posted. |
I writed the function
result is a dict with necessary data
TypeError: initializer for ctype 'char *' must be a str or list or tuple, not unicode
OIDs are not increasing
{}
As example: the snmpwalk tool in shell returned also necessary data, but append similar error.
Sorry for my poor English.
The text was updated successfully, but these errors were encountered: