* Alex Volkov <[email protected]>, 2010-08-27, 16:03:
Okay, I have the same situation and can reproduce the bug.

[...]

So I poked around in those files and didn't find anything out of
ordinary. On my system by default variable PYSNMP_API_VERSION is unset,
I've tried setting it, verify that by running

import os
print os.environ.has_key('PYSNMP_API_VERSION')
print os.environ['PYSNMP_API_VERSION']

and then running import statement 'from pysnmp.entity.rfc3413.oneliner
import cmdgen' but that didn't make any difference.

I also dumped sys.modules map since it seems that all the files I
mentioned above are just adding entries to sys.modules map. So here's
map before running 'from pysnmp.entity.rfc3413.oneliner import cmdgen'
import:
[...]
And here's its state after I ran that command from the interpreter:
[...]

Hrm. That clearly shows that pysnmp.switchApiVersion() was not run here, as it should. Could you please add some debug print statements to /usr/lib/pymodules/python2.6/pysnmp/__init__.py, so that we can see why it happens?

--
Jakub Wilk

Attachment: signature.asc
Description: Digital signature

Reply via email to